From: Stefano Lattarini Date: Tue, 18 Oct 2011 19:05:24 +0000 (+0200) Subject: tests: avoid spurious failure in 'parallel-tests3.test' X-Git-Tag: v1.11.1b~16^2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5b69b8a0d787cf798653fdb975affa9e7ff44b8;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index a2ecefcae..9ed30f080 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-10-18 Stefano Lattarini + + 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 tests: fix spurious failure with autoconf 2.62 diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test index a138f908a..69ba1d07e 100755 --- a/tests/parallel-tests3.test +++ b/tests/parallel-tests3.test @@ -70,15 +70,22 @@ $sleep : >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 + :