+2011-10-18 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ tests: avoid spurious failure in 'parallel-tests3.test'
+ This fixes automake bug#8788.
+ * tests/parallel-tests3.test: To ensure that the serial run of
+ the dummy testsuite is still ongoing when the parallel run has
+ terminated, use `kill -0', not a bare `kill'. This will prevent
+ a testsuite crash on NetBSD 5.1, and a testsuite hang on FreeBSD
+ 8.2. Also, since we are at it, try harder to avoid possible
+ hangs of the script in other unusual situations.
+
2011-10-17 Stefano Lattarini <stefano.lattarini@gmail.com>
tests: fix spurious failure with autoconf 2.62
: >stdout
$MAKE -j4 check >> stdout
cd ..
-kill $!
+# Ensure the tests are really being run in parallel mode: if this is
+# the case, the serial run of the dummy testsuite started above should
+# still be ongoing when the parallel one has terminated.
+kill -0 $!
cat parallel/stdout
test `grep -c PASS parallel/stdout` -eq 8
-# Wait long enough so that there are no open files any more
-# when the post-test cleanup runs.
-while test ! -f serial/test-suite.log
-do
- $sleep
+# Wait long enough so that there are no open files any more when the
+# post-test cleanup runs. But exit after we've waited for two minutes
+# or more, to avoid testsuite hangs in unusual situations (this has
+# already happened).
+i=1
+while test ! -f serial/test-suite.log && test $i -le 120; do
+ i=`expr $i + 1`
+ sleep '1' # Extra quoting to please maintainer-check.
done
$sleep
+
: