From: Stefano Lattarini Date: Fri, 13 Apr 2012 20:59:31 +0000 (+0200) Subject: [ng] tests: remove some workarounds for non-GNU make X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf0c63d0a0233f20aef5fff4bf1bb33302276eca;p=thirdparty%2Fautomake.git [ng] tests: remove some workarounds for non-GNU make * t/makej2.sh: Adjust heading comments. Don't check whether $MAKE groks the '-j' option: GNU make is assured to do so. * t/check-concurrency-bug9245.sh: Likewise. Fix botched indentation since we are at it. * t/remake4.sh: Adjust heading comments. * t/parallel-tests6.sh: Likewise. * t/deleted-am.sh: Remove extra '$sleep' call required to work around a bug of FreeBSD make. * t/colon6.test: Remove a workaround needed by HP-UX make. * t/spy.test: Likewise. Uncomment the part of the checks that still wasn't portable to BSD make. Signed-off-by: Stefano Lattarini --- diff --git a/t/check-concurrency-bug9245.sh b/t/check-concurrency-bug9245.sh index 8c9dc5395..c2d3d53a3 100755 --- a/t/check-concurrency-bug9245.sh +++ b/t/check-concurrency-bug9245.sh @@ -14,8 +14,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Look for a bug where FreeBSD make in concurrent mode reported success -# even when the Automake-generated parallel testsuite harness failed. +# Look for a bug where make in concurrent mode reported success even +# when the Automake-generated parallel testsuite harness failed. +# This issue was originally present only with FreeBSD make, but we +# keep the test anyway, for extra safety. # See automake bug#9245. . ./defs || Exit 1 @@ -42,12 +44,9 @@ $AUTOMAKE -a ./configure -# Some make implementations don't grok the '-j' option. -$MAKE -j1 || Exit 77 - for j in '' -j1 -j2; do $MAKE $j check && Exit 1 - $MAKE $j TESTS=foo.test check && Exit 1 + $MAKE $j TESTS=foo.test check && Exit 1 if test x"$am_parallel_tests" = x"yes"; then $MAKE $j recheck && Exit 1 $MAKE $j TEST_LOGS=foo.log check && Exit 1 diff --git a/t/colon6.sh b/t/colon6.sh index 9f14d2a09..09cc2eb15 100755 --- a/t/colon6.sh +++ b/t/colon6.sh @@ -60,11 +60,6 @@ for vpath in : false; do cd demo $sleep - # HP-UX make considers targets with exact time stamps as one of their - # prerequisites out of date. Ensure Makefile is newer than config.status to - # avoid triggering the am--refresh rule in the (here-nonexistent) toplevel - # Makefile. - touch Makefile # version.good should depend on version.gin. echo "Rebuilt (srcdir=$srcdir)" > ../$srcdir/demo/version.gin diff --git a/t/deleted-am.sh b/t/deleted-am.sh index 636286cf9..e8e7a2268 100755 --- a/t/deleted-am.sh +++ b/t/deleted-am.sh @@ -35,7 +35,6 @@ $AUTOMAKE $MAKE rm -f zardoz.am -$sleep # Required to avoid racy failures with FreeBSD make. $MAKE >output 2>&1 && { cat output; Exit 1; } cat output # This error will come from automake, not make, so we can be stricter @@ -49,7 +48,6 @@ $AUTOMAKE Makefile ./config.status Makefile $MAKE # Sanity check. rm -f foobar.am -$sleep # Required to avoid racy failures with FreeBSD make. $MAKE >output 2>&1 && { cat output; Exit 1; } cat output # This error will come from automake, not make, so we can be stricter diff --git a/t/makej2.sh b/t/makej2.sh index 8183887a4..3e89df634 100755 --- a/t/makej2.sh +++ b/t/makej2.sh @@ -17,6 +17,8 @@ # Test to make sure known BSD 'make -jN' issues are fixed: # without -B, it may reuse the same shell for separate commands in a # rule, which can lead to interesting results. +# Problems like this shouldn't happen with GNU make, but we keep the +# test anyway for the moment, for extra safety. . ./defs || Exit 1 @@ -37,7 +39,6 @@ mkdir build cd build ../configure "--prefix=`pwd`/inst" -$MAKE -j2 || skip_ "$MAKE failed to run with two parallel jobs" $MAKE -j2 distcheck $MAKE test-distdir-removed diff --git a/t/parallel-tests6.sh b/t/parallel-tests6.sh index eee653810..60032952f 100755 --- a/t/parallel-tests6.sh +++ b/t/parallel-tests6.sh @@ -16,7 +16,6 @@ # Check parallel-tests features: # - empty TESTS -# BSD make will expand '$(TESTS:=.log)' to '.log' unless overridden. # See parallel-tests10.test for a similar issue. am_parallel_tests=yes diff --git a/t/remake4.sh b/t/remake4.sh index 43f856994..c43a535ed 100755 --- a/t/remake4.sh +++ b/t/remake4.sh @@ -21,7 +21,9 @@ # # If this fails, this is likely to be due to a dependency being # given two different name. For instance BSD Make does not know -# that 'Makefile' is the same as './Makefile' +# that 'Makefile' is the same as './Makefile'. This shouldn't +# happen with GNU make, but we keep the test anyway, for extra +# safety. # # Report from Akim Demaille. diff --git a/t/spy.sh b/t/spy.sh index 0d087a41a..35303283e 100755 --- a/t/spy.sh +++ b/t/spy.sh @@ -85,8 +85,6 @@ $sleep touch b $MAKE test "`cat a`" = rule1 -# Ensure a is strictly newer than b, so HP-UX make does not execute rule2. -$sleep : > a $sleep touch c @@ -96,11 +94,11 @@ test "`cat a`" = rule2 # Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD # make, see explanation above. -#: > a -#$sleep -#touch b c -#$MAKE -#grep rule1 a -#grep rule2 a +: > a +$sleep +touch b c +$MAKE +grep rule1 a +grep rule2 a :