diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-01-17 11:07:01 +0100 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-01-17 11:07:01 +0100 |
commit | d376fb6033bddabf86b91bd5ce58627a91f59fc8 (patch) | |
tree | 82b019156a8a2a99d2adbcc20ccb3fc4cda54dc0 /tests/tap-doc2.test | |
parent | 30f40f634fd5bc80a9cccbacc383ef1e2b9c153a (diff) | |
download | automake-d376fb6033bddabf86b91bd5ce58627a91f59fc8.tar.gz |
tests: avoid spurious failures with parallel make
Some tests are unprepared to be run with a make command that runs
in parallel mode by default. This can happen e.g., if the user
explicitly run the tests with something like:
AM_TESTSUITE_MAKE="gmake -j3" in the
in the environment, but also if the make used in the testsuite is
Sun Distributed Make, and the 'DMAKE_MODE' environment variable is
set to "parallel".
Fix some instances of this issue.
* tests/tap-doc.test (Makefile.am): Declare explicit dependencies
among the test cases, to ensure they are run in the correct order.
* tests/tap-doc2.test: Set the 'DMAKE_MODE' environment variable
to "serial", to prevent Sun dmake from trying to run in parallel.
Remove other now-superfluous workarounds for dmake.
Diffstat (limited to 'tests/tap-doc2.test')
-rwxr-xr-x | tests/tap-doc2.test | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/tests/tap-doc2.test b/tests/tap-doc2.test index c5fe2b6d1..c844f7981 100755 --- a/tests/tap-doc2.test +++ b/tests/tap-doc2.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011 Free Software Foundation, Inc. +# Copyright (C) 2011, 2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -71,13 +71,6 @@ chmod a+x *.test # Strip extra "informative" lines that could be printed by Solaris # Distributed Make. -strip_dmake_junk () -{ - cat $1 - LC_ALL=C $EGREP -v ' --> ([0-9][0-9]* job|[Jj]ob output)' "$@" >t - mv -f t $1 -} - mkdir build-aux cp "$am_scriptdir"/tap-driver.pl build-aux \ || framework_failure_ "fetching the perl TAP driver" @@ -89,6 +82,9 @@ cp "$am_scriptdir"/tap-driver.pl build-aux \ case $MAKE in *\ -j*) skip_ "can't work easily with concurrent make";; esac +# Prevent Sun Distributed Make from trying to run in parallel. +DMAKE_MODE=serial; export DMAKE_MODE + $MAKE check >stdout && { cat stdout; Exit 1; } cat stdout @@ -105,7 +101,6 @@ ERROR: baz.test - exited with status 7 END sed -n '/^PASS: foo\.test/,/^ERROR: baz\.test/p' stdout > got -strip_dmake_junk got cat exp cat got @@ -128,7 +123,6 @@ PASS: baz.test 1 END sed -n '/^PASS: foo\.test/,/^PASS: baz\.test/p' stdout > got -strip_dmake_junk got cat exp cat got |