diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-24 01:13:40 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-24 10:03:07 +0200 |
commit | d19eb85cc3fda93c0dd3df93a2c126dcae1de16a (patch) | |
tree | 851ba5d007dc7f661f2aaea8bf3d04d820801fee /t/parallel-tests-concurrency.sh | |
parent | f859f346f66769dd6f66e472701d59fe6d88eda1 (diff) | |
download | automake-d19eb85cc3fda93c0dd3df93a2c126dcae1de16a.tar.gz |
tests: use append mode to capture parallel make output
This will allow us to run the Automake testsuite forcing all the make
invocations in the test cases to run in parallel mode [1], but without
hitting the spurious failure reported in automake bug#11413.
See also:
<http://lists.gnu.org/archive/html/bug-make/2013-05/msg00135.html>
The make invocations in the test cases can be forced to run in parallel
mode by, e.g., invoking "make check" like this:
make check AM_TESTSUITE_MAKE="make -j16"
The possible spurious failures hinted above are due to the fact that
the redirected output of parallel make can racily lose lines. For
example, if GNU make (3.82) is run with -j10 on a Makefile like this:
all = 0 1 2 3 4 5 6 7 8 9
default: $(all)
$(all):
@sleep 0.$$(($RANDOM % 10)); echo $@
and has its standard output redirected in overwrite-mode to a regular
file, it looses a line of that output every 15 runs or so on a Fedora
17 system with 64 ppc64 cores. Redirection in append mode does not
suffer of this problem, as explained here:
<http://lists.gnu.org/archive/html/automake-patches/2009-03/msg00073.html>
See also previous commits v1.12-63-g45c1fcd of 2012-05-05 (tests: use
append mode to capture parallel make output) and Release-1-10-280-g6426999
of 2009-03-10 (Use append mode to capture parallel test output).
* t/ax/am-test-lib.sh (run_make): Adjust and enhance.
* t/lisp8.sh: Take advantage of the enhancement, nd stop doing output
redirection for $MAKE by hand.
* t/tap-more.sh: Likewise.
* t/parallel-tests-concurrency.sh: Likewise.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 't/parallel-tests-concurrency.sh')
-rw-r--r-- | t/parallel-tests-concurrency.sh | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/t/parallel-tests-concurrency.sh b/t/parallel-tests-concurrency.sh index dd5122581..7fbd20eeb 100644 --- a/t/parallel-tests-concurrency.sh +++ b/t/parallel-tests-concurrency.sh @@ -40,7 +40,7 @@ END if test x"$j" = xNONE; then skip_ "can't run make in parallel mode" fi - $MAKE ${j}2 all >output 2>&1 || continue + run_make -M -- ${j}2 all || continue $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue break done @@ -92,11 +92,7 @@ cd serial $MAKE ${j}1 check & cd ../parallel $sleep -# Use append mode here to avoid dropping output. See automake bug#11413. -# TODO: port this to to run_make(), and rewrite this hunk to use that -# function ... -: > stdout -$MAKE ${j}4 check >> stdout +run_make -O -- ${j}4 check cd .. # 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 |