]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
parallel-tests: avoid GNU make 3.80 substitution bug.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 24 May 2009 07:03:00 +0000 (09:03 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 24 May 2009 13:29:35 +0000 (15:29 +0200)
* 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 <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
lib/Automake/tests/Makefile.in
lib/am/check.am
tests/Makefile.am
tests/Makefile.in
tests/parallel-tests10.test [new file with mode: 0755]
tests/parallel-tests6.test

index cac0302005df0d3b003f03e977e1c86e76ccbaa0..0ef02673f61a89f0cb63a044227173b0388bb7fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-05-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       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  <Ralf.Wildenhues@gmx.de>
 
        testsuite: unset installation directory variables.
diff --git a/NEWS b/NEWS
index 48873d0302cf211a78fb965a50955fced476db75..c3bb3ab474461f88e8ad42a0416b691607635961 100644 (file)
--- 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'
index 7c337775b924b469f88aca7ea1c1dea9c4076710..cef0510d08a6fecb82633bc7b8ea74bb06ead53e 100644 (file)
@@ -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';            \
index 8c085d0ca43d9d07834e5c8c436e29f5a150f2eb..b1d1aade4d9bb749c2683890e487bee2990caa5a 100644 (file)
@@ -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
 
index 5d5a2905108c24847a55a7c7643e7ab79f3804c7..7895816bef08478a747e8e7a0b716ee373166a71 100644 (file)
@@ -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 \
index e084c6c6bbbf4e29acd9dd1f822cabefc9855db3..e08860b8a7737b9c826e0a3556c9cac01ec40854 100644 (file)
@@ -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 (executable)
index 0000000..2642c7a
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+
+# 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
index 50f6c446e73fa9e30d68e4d9996f1f3e7700dff5..5dbb433558c0a3976f35bf5f98370b337075a16d 100755 (executable)
@@ -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