From: Ralf Wildenhues Date: Sun, 24 May 2009 07:03:00 +0000 (+0200) Subject: parallel-tests: avoid GNU make 3.80 substitution bug. X-Git-Tag: v1.11.1~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=218e678b571d804388c7a8726544c170e49c0d03;p=thirdparty%2Fautomake.git parallel-tests: avoid GNU make 3.80 substitution bug. * lib/am/check.am [PARALLEL_TESTS] (check-TESTS): Remove any `.log' entries from `$(TEST_LOGS)' even if the list is nonempty, to work around GNU make 3.80 substitution reference issue with trailing white space in the variable. * tests/parallel-tests10.test: New test. * tests/parallel-tests6.test: Update comment. * tests/Makefile.am: Update. * NEWS: Update. Report by Bob Friesenhahn. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index cac030200..0ef02673f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-05-24 Ralf Wildenhues + + parallel-tests: avoid GNU make 3.80 substitution bug. + * lib/am/check.am [PARALLEL_TESTS] (check-TESTS): Remove any + `.log' entries from `$(TEST_LOGS)' even if the list is nonempty, + to work around GNU make 3.80 substitution reference issue with + trailing white space in the variable. + * tests/parallel-tests10.test: New test. + * tests/parallel-tests6.test: Update comment. + * tests/Makefile.am: Update. + * NEWS: Update. + Report by Bob Friesenhahn. + 2009-05-23 Ralf Wildenhues testsuite: unset installation directory variables. diff --git a/NEWS b/NEWS index 48873d030..c3bb3ab47 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,11 @@ New in 1.11.0a: Bugs fixed in 1.11.0a: +* Bugs introduced by 1.11: + + - The `parallel-tests' test driver works around a GNU make 3.80 bug with + trailing white space in the test list (`TESTS = foo $(EMPTY)'). + * Long standing bugs: - On Darwin 9, `pythondir' and `pyexecdir' pointed below `/Library/Python' diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 7c337775b..cef0510d0 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -386,10 +386,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \ - set_logs=TEST_LOGS=; \ - fi; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs + @list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test .log = $$f || echo $$f; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" .log.html: @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ diff --git a/lib/am/check.am b/lib/am/check.am index 8c085d0ca..b1d1aade4 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -234,10 +234,11 @@ check-TESTS: ## cannot use `$?' to compute the set of lazily rerun tests, lest ## we rely on .PHONY to work portably. @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \ - set_logs=TEST_LOGS=; \ - fi; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs + @list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test .log = $$f || echo $$f; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" AM_RECURSIVE_TARGETS += check diff --git a/tests/Makefile.am b/tests/Makefile.am index 5d5a29051..7895816be 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -502,6 +502,7 @@ parallel-tests6.test \ parallel-tests7.test \ parallel-tests8.test \ parallel-tests9.test \ +parallel-tests10.test \ parse.test \ percent.test \ percent2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index e084c6c6b..e08860b8a 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -735,6 +735,7 @@ parallel-tests6.test \ parallel-tests7.test \ parallel-tests8.test \ parallel-tests9.test \ +parallel-tests10.test \ parse.test \ percent.test \ percent2.test \ @@ -1129,10 +1130,11 @@ $(TEST_SUITE_LOG): $(TEST_LOGS) check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @set_logs=; if test "X$(TEST_LOGS)" = X.log; then \ - set_logs=TEST_LOGS=; \ - fi; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs + @list='$(TEST_LOGS)'; \ + list=`for f in $$list; do \ + test .log = $$f || echo $$f; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" .log.html: @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \ diff --git a/tests/parallel-tests10.test b/tests/parallel-tests10.test new file mode 100755 index 000000000..2642c7af0 --- /dev/null +++ b/tests/parallel-tests10.test @@ -0,0 +1,47 @@ +#! /bin/sh +# Copyright (C) 2009 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Check parallel-tests features: +# - trailing whitespace in TESTS +# GNU make 3.80 may expand trailing white space to `.log'. + +. ./defs-p || Exit 1 +set -e + +cat >> configure.in << 'END' +AC_OUTPUT +END + +cat > Makefile.am << 'END' +TESTS = foo $(BAR) +BAR = +END + +cat >foo <<'END' +#! /bin/sh +exit 0 +END + +chmod +x ./foo + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure +$MAKE check + +Exit 0 diff --git a/tests/parallel-tests6.test b/tests/parallel-tests6.test index 50f6c446e..5dbb43355 100755 --- a/tests/parallel-tests6.test +++ b/tests/parallel-tests6.test @@ -17,6 +17,7 @@ # Check parallel-tests features: # - empty TESTS # BSD make will expand `$(TESTS:=.log)' to `.log' unless overridden. +# See parallel-tests10.test for a similar issue. . ./defs-p || Exit 1 set -e