distlinksbrk.test: Work around botched "make -k".
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 Dec 2010 14:38:08 +0000 (15:38 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 Dec 2010 14:38:08 +0000 (15:38 +0100)
* tests/distlinksbrk.test: Run "make" multiple times and grep
its output each time for a single error message, rather than
running "make -k" one single time and grepping its output for
all the expected error messages.  This should work around make
implementations with limited (broken?) `-k' support; for more
information, see these subthreads on the automake-patches list:
  - 2010-11-15, "Testsuite failures on HP-UX 11.23",
    <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00162.html>
  - 2010-11-15, "Testsuite failures on IRIX 6.5",
    <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00166.html>

ChangeLog
tests/distlinksbrk.test

index cd301e3..cc6b22a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2010-12-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       distlinksbrk.test: Work around botched "make -k".
+       * tests/distlinksbrk.test: Run "make" multiple times and grep
+       its output each time for a single error message, rather than
+       running "make -k" one single time and grepping its output for
+       all the expected error messages.  This should work around make
+       implementations with limited (broken?) `-k' support; for more
+       information, see these subthreads on the automake-patches list:
+         - 2010-11-15, "Testsuite failures on HP-UX 11.23",
+           <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00162.html>
+         - 2010-11-15, "Testsuite failures on IRIX 6.5",
+           <http://lists.gnu.org/archive/html/automake-patches/2010-11/msg00166.html>
+
 2010-06-21  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Add a test checking that distributed broken symlinks cause
index 1e478ab..2314408 100755 (executable)
@@ -49,30 +49,25 @@ test -h $lnk2
 test -h $lnka
 test -h $lnkb
 
-cat >>configure.in <<END
+cat >> configure.in <<'END'
 AC_OUTPUT
 END
 
-cat > Makefile.am <<END
-EXTRA_DIST = $lnk1 $lnk2 $lnka $lnkb
-END
-
-ls -l
-
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
-./configure
 
-# Distribution must fail.
-$MAKE distdir && Exit 1
+ls -l # for debugging
 
-# Names of distributed broken symlinks should be reported in make output.
-$MAKE -k distdir >out 2>&1 || : # don't trust the exit status of make -k
-cat out
-$FGREP $lnk1 out
-$FGREP $lnk2 out
-$FGREP $lnka out
-$FGREP $lnkb out
+# Don't try to use "make -k", because some botched make implementations
+# (HP-UX, IRIX) might still exit on the first error in this situations.
+for lnk in $lnk1 $lnk2 $lnka $lnkb; do
+  echo "EXTRA_DIST = $lnk" > Makefile.am
+  $AUTOMAKE
+  ./configure
+  # Distribution must fail, with a decent error message.
+  $MAKE distdir >out 2>&1 && { cat out; Exit 1; }
+  cat out
+  $FGREP $lnk out
+done
 
 :