tests: verify the shell test scripts are syntactically valid
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 11 Jul 2012 08:51:15 +0000 (10:51 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 13 Jul 2012 10:56:47 +0000 (12:56 +0200)
commit9df354ac9834f319c1faeef11748b7f1f7afdfae
tree2d7e80997097e1684b47902a1bedf25a13ca17b2
parent65e7ac8c3556d1895ee597811856710143cfc4ac
tests: verify the shell test scripts are syntactically valid

Fixes automake bug#11898.

This measure of extra safety is mostly motivated by the fact that some
shells (at least some versions of Bash in the 3.x release series, one
of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the
/usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status
0 upon encountering a syntax error, if an exit trap is sett (as it is in
our test scripts).

* Makefile.am (check-tests-syntax): New, check that the shell test
scripts listed in $(TESTS) are syntactically correct.
(.PHONY, check-local): Depend on it.
* t/self-check-exit.tap : Remove checks verifying that a script exits
with non-zero status upon encountering a syntax error; as explained
above, we can't depend on that.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Makefile.am
t/self-check-exit.tap