]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
self tests: fix spurious failures when /bin/ksh do not exists
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Sep 2011 09:16:02 +0000 (11:16 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Sep 2011 09:18:10 +0000 (11:18 +0200)
* tests/self-check-reexec.test: Ensure that the non-bash shells
we look do really exists.  Since we are at it, also try the name
`ash', non `dash', for the Almquist Shell, for Cygwin 1.5.

ChangeLog
tests/self-check-reexec.test

index c1d936524de98ee61945bec7856c59cea7579856..1142bc65639385e3b6fdfc0f1d89956a64fb9add 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       self tests: fix spurious failures when /bin/ksh do not exists
+       * tests/self-check-reexec.test: Ensure that the non-bash shells
+       we look do really exists.  Since we are at it, also try the name
+       `ash', non `dash', for the Almquist Shell, for Cygwin 1.5.
+
 2011-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        tests: more use of TAP in our own testsuite
index 2a0fb3308e7262b0abe5fdd381568466330d1af5..46cd0d41d7d65a210b2495ec063bca22f7a36dc8 100755 (executable)
@@ -28,8 +28,9 @@ unset AM_TESTS_REEXEC BASH_VERSION || :
 
 bash -c 'test -n "$BASH_VERSION"' || skip_ "bash shell not found"
 
-for shell in /bin/sh /bin/ksh sh ksh dash pdksh __no_shell__; do
+for shell in /bin/sh /bin/ksh sh ksh ash dash pdksh __no_shell__; do
   test $shell = __no_shell__ && skip_ "can't find any non-bash shell"
+  $shell -c 'exit 0' || continue
   $shell -c 'test -n "$BASH_VERSION"' && continue
   break
 done