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 /Makefile.am | |
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 'Makefile.am')
-rw-r--r-- | Makefile.am | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am index 57a21373a..c464d8bab 100644 --- a/Makefile.am +++ b/Makefile.am @@ -387,8 +387,11 @@ $(srcdir)/t/testsuite-part.am: $(srcdir)/gen-testsuite-part Makefile.am # Static dependencies valid for each test case. check_SCRIPTS = t/wrap/aclocal-$(APIVERSION) t/wrap/automake-$(APIVERSION) -dist_check_DATA = t/ax/plain-functions.sh t/ax/tap-functions.sh -check_DATA = defs defs-static +dist_check_DATA = \ + t/ax/test-init.sh \ + t/ax/plain-functions.sh \ + t/ax/tap-functions.sh +nodist_check_DATA = defs-static # Few more static dependencies. t/distcheck-missing-m4.log: t/ax/distcheck-hook-m4.am |