]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: fix spurious failure due to non-POSIX shells ng/master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Jan 2015 10:59:03 +0000 (11:59 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Wed, 7 Jan 2015 16:54:59 +0000 (17:54 +0100)
Seen on, e.g., Solaris 10.

* t/internals.tap: Here, by making sure a POSIX shell is used to
run the recipe in the Makefiles running our unit tests.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
t/internals.tap

index eede9748f764b4665721d81a4e8c6c6531ce48e3..cc997c3087ed4b0b61d771cc32503d29eb70adf8 100644 (file)
@@ -37,11 +37,17 @@ T ()
   cd T$i.d
   {
     echo 'include ../defn.mk'
+    # Make sure $(shell ...) invocations use a POSIX shell -- /bin/sh is
+    # borked and non-POSIX on a few systems, most notably Solaris 10.
+    # That has already caused spurious failures in the past.
+    echo "SHELL = ${SHELL}"
     echo 'lower = abcdefghijklmnopqrstuvwxyz'
     echo 'upper = ABCDEFGHIJKLMNOPQRSTUVWXYZ'
     echo 'digits = 0123456789'
+    # The rest of the makefile come from the standard input passed to this
+    # function.
+    cat
   } > Makefile
-  cat >> Makefile
   test_name=$1; shift
   command_ok_ "$test_name" $MAKE ${1+"$@"} test
   cd ..