automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'make check' failure on MinGW


From: Ralf Wildenhues
Subject: Re: 'make check' failure on MinGW
Date: Sun, 24 May 2009 15:32:28 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

I've been able to reproduce this issue on GNU/Linux with GNU make 3.80.
Committing this fix (will push out soon).

An easy workaround for this issue is to ensure that the TESTS variable
never contains trailing white space, i.e., the last test should be used
unconditionally on every system.

Thanks for the report!
Ralf

    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.

diff --git a/NEWS b/NEWS
index 48873d0..c3bb3ab 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/am/check.am b/lib/am/check.am
index 8c085d0..b1d1aad 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 5d5a290..7895816 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/parallel-tests10.test b/tests/parallel-tests10.test
new file mode 100755
index 0000000..2642c7a
--- /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 <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
diff --git a/tests/parallel-tests6.test b/tests/parallel-tests6.test
index 50f6c44..5dbb433 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]