tests: can check our recipes avoid trailing backslashes
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 28 Oct 2012 13:02:46 +0000 (14:02 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 31 Oct 2012 10:39:03 +0000 (11:39 +0100)
commitaecd1be61c2d27618a594842501b58bd4ddd8991
tree0f795c087a341b56496a2bb380ce972437d1c3f3
parentbf016cee0efa2dd3594513791f588b47fa5c456f
tests: can check our recipes avoid trailing backslashes

This is related to commit v1.11-1704-g254227b of 2012-05-01,
"parallel-tests: avoid trailing backslashes in make recipes",
and automake bug#10436.

Recipes with a trailing backslash character (possibly followed by
blank characters only) can cause spurious syntax errors with at
least older bash versions (e.g., bash 2.05b), and can be potentially
be unportable to other weaker shells.

So provide a target that runs the testsuite looking for this kind
of breakage (without requiring a real bugged shell).

* t/ax/shell-no-trail-bslash.in: New, a "shell" that chokes on '-c'
commands having a trailing '\' (possibly followed by whitespace only).
* Makefile (t/ax/shell-no-trail-bslash): Generate this script from it.
(noinst_SCRIPTS, CLEANFILES): Add it.
(EXTRA_DIST): Add 't/ax/shell-no-trail-bslash.in'.
(check-no-trailing-backslash-in-recipes): New target, runs the testsuite
with 'shell-no-trail-bslash' as the CONFIG_SHELL, to catch possible
recipes having a trailing backslash character (possibly followed by
* .gitignore: Update.
* t/self-check-shell-no-trail-bslash.sh: New testsuite self-check.
* t/parallel-tests-trailing-bslash.sh: Remove as obsolete.
* t/list-of-tests.mk: Adjust.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
.gitignore
Makefile.am
t/ax/shell-no-trail-bslash.in [new file with mode: 0644]
t/list-of-tests.mk
t/parallel-tests-trailing-bslash.sh [deleted file]
t/self-check-shell-no-trail-bslash.sh [new file with mode: 0755]