diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-22 11:40:39 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-06-22 14:32:52 +0200 |
commit | 3a1a8c6d3cb46bfe65b715ddd8a3e0d7e27e1bf7 (patch) | |
tree | 288395ba9e76fcf748ebbf56b0ab2c9f1d543be8 /syntax-checks.mk | |
parent | 6e713425a0dcede167924e7691e95ab5e54e399c (diff) | |
download | automake-3a1a8c6d3cb46bfe65b715ddd8a3e0d7e27e1bf7.tar.gz |
tests: automatic re-execution works for non-POSIX shells too
Some inferior shells are too greedy in parsing their input. If a
non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch
one of our test scripts, it would fail unconditionally, because it
unexpectedly saw some (by it) unsupported constructs, notwithstanding
such constructs being placed *after* the code implementing automatic
test re-execution with a better shell. In conclusion, the shell
bailed out like this:
$ /bin/sh t/ar.sh
$ t/ar.sh: syntax error at line 257: `is_newest_files=$' unexpected
By moving all the potentially problematic code in a separate file, to
be sourced only after the code for automatic re-execution with a better
shell, we ensure that inferior shell cannot see such code by mistake.
* defs: All code after automatic shell re-execution moved out ...
* t/ax/test-init.sh: ... to this new file.
* syntax-checks.mk (xdefs): Add it.
* Makefile.am (dist_check_DATA): Add it. Also move in 'defs' from
a less explicit 'check_DATA' declaration.
(nodist_check_DATA): Move in 'defs-static' from a less explicit
'check_DATA' declaration.
(check_DATA): Remove.
* t/self-check-sanity.sh: Remove, it was actually too hacky and brittle,
sanity-checking situations we don0t actually care about.
* t/list-of-tests.mk: Adjust.
* t/self-check-explicit-skips.sh: Adjust, and fix a botched heading
comments while we are at it.
* t/self-check-reexec.tap: Adjust.
* t/self-check-cleanup.tap: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'syntax-checks.mk')
-rw-r--r-- | syntax-checks.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/syntax-checks.mk b/syntax-checks.mk index c09156e8f..f610a25ce 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -31,7 +31,7 @@ xtests := $(shell \ done; \ done | sort) -xdefs = $(srcdir)/defs $(srcdir)/defs-static.in +xdefs = $(srcdir)/t/ax/test-init.sh $(srcdir)/defs $(srcdir)/defs-static.in ams := $(shell find $(srcdir) -name '*.dir' -prune -o -name '*.am' -print) |