[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-17
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-174-g5fb73b0 |
Date: |
Sat, 30 Jun 2012 20:32:27 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=5fb73b05d111bc3da4d16007a2b1a6aee8e49198
The branch, master has been updated
via 5fb73b05d111bc3da4d16007a2b1a6aee8e49198 (commit)
via 26c7b8f50a02749e49135cac58c793bde97ec8fc (commit)
via e18ac4b80c7817b124880f007ba1c796f8ac9794 (commit)
via 6c9b282b0a3d7adb3209f74655611e2fdfbf554e (commit)
via c49475046c64789daf647f2b566be8fe49aced72 (commit)
via 848744c8189abdba50d0fdf5dbd2a713ac210632 (commit)
via 2a3e45d6f3083c5152d94156f8b4e21366090c0f (commit)
via f7132aee3c5c0024b91c925e712f249838b98c46 (commit)
from f99ee7616ced4d07684a30a67b72e46aba00c65f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5fb73b05d111bc3da4d16007a2b1a6aee8e49198
Merge: e18ac4b 26c7b8f
Author: Stefano Lattarini <address@hidden>
Date: Sat Jun 30 22:17:22 2012 +0200
Merge branch 'maint'
* maint:
parallel-tests: recipes for "check" and "recheck" are separated again
commit e18ac4b80c7817b124880f007ba1c796f8ac9794
Merge: 848744c c494750
Author: Stefano Lattarini <address@hidden>
Date: Sat Jun 30 21:32:20 2012 +0200
Merge branch 'maint'
* maint:
parallel-tests: "recheck" behaves better in case of compilation failures
scripts: quote 'like this', not `like this'
Signed-off-by: Stefano Lattarini <address@hidden>
commit 848744c8189abdba50d0fdf5dbd2a713ac210632
Author: Stefano Lattarini <address@hidden>
Date: Sat Jun 30 19:46:13 2012 +0200
tests: prefer "test ! -e FILE" to check that a file doesn't exist
* t/autohdrdry.sh: Here, rather than using "test ! -r FILE".
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
Summary of changes:
NEWS | 10 ++++
lib/am/check.am | 93 +++++++++++++++++++++--------------
lib/test-driver | 6 +-
t/autohdrdry.sh | 2 +-
t/list-of-tests.mk | 1 +
t/parallel-tests-recheck-pr11791.sh | 87 ++++++++++++++++++++++++++++++++
6 files changed, 158 insertions(+), 41 deletions(-)
create mode 100755 t/parallel-tests-recheck-pr11791.sh
diff --git a/NEWS b/NEWS
index 54acc7a..1612a36 100644
--- a/NEWS
+++ b/NEWS
@@ -140,6 +140,16 @@ New in 1.12.2:
to a shell conditional that can be used in recipes to know whether
make is being run in silent or verbose mode.
+Bugs fixed in 1.12.2:
+
+* Long-standing bugs:
+
+ - The "recheck" targets behaves better in the face of build failures
+ related to previously failed tests. For example, if a test is a
+ compiled program that must be rerun by "make recheck", and its
+ compilation fails, it will still be rerun by further "make recheck"
+ invocations. See automake bug#11791.
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
New in 1.12.1:
diff --git a/lib/am/check.am b/lib/am/check.am
index ad970ad..f091114 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -396,21 +396,10 @@ RECHECK_LOGS = $(TEST_LOGS)
## Running all tests, or rechecking failures. ##
## ------------------------------------------ ##
-check-TESTS recheck:
-## If we are running "make recheck", it's not the user which can decide
-## which tests to consider for re-execution, so we must ignore the value
-## of $(RECHECK_LOGS).
-## Here and below, we expand $(RECHECK_LOGS) only once, to avoid exceeding
-## line length limits.
- @if test $@ != recheck; then \
- list='$(RECHECK_LOGS)'; \
- test -z "$$list" || rm -f $$list; \
- fi
- @if test $@ != recheck; then \
- list='$(RECHECK_LOGS:.log=.trs)'; \
- test -z "$$list" || rm -f $$list; \
- fi
-## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
+check-TESTS:
+ list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
## in any case even in lazy mode: otherwise, if no test needs rerunning,
## or a prior run plus reruns all happen within the same timestamp (can
## happen with a prior "make TESTS=<subset>"), then we get no log output.
@@ -418,35 +407,65 @@ check-TESTS recheck:
## 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)
- @$(am__set_TESTS_bases); \
- if test $@ = recheck; then \
-## If running a "make recheck", we must only consider tests that had an
-## unexpected outcome (FAIL or XPASS) in the earlier run.
- bases=`for i in $$bases; do echo $$i; done \
- | $(am__list_recheck_tests)` || exit 1; \
- fi; \
+ @set +e; $(am__set_TESTS_bases); \
log_list=`for i in $$bases; do echo $$i.log; done`; \
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
-## Remove newlines and normalize whitespace, being careful to avoid extra
-## whitespace in the definition of $log_list, since its value will be
-## passed to the recursive make invocation below through the TEST_LOGS
-## macro, and leading/trailing white space in a make macro definition can
-## be problematic. In this particular case, trailing white space is known
-## to have caused segmentation faults on Solaris 10 XPG4 make:
+## Remove newlines and normalize whitespace. Trailing (and possibly
+## leading) whitespace is known to cause segmentation faults on
+## Solaris 10 XPG4 make.
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
-## Under "make recheck", remove the .log and .trs files associated
-## with the files to recheck, so that those will be rerun by the
-## "make test-suite.log" recursive invocation below. But use a proper
-## hack to avoid extra files removal when running under "make -n".
- if test $@ != recheck || $(am__make_dryrun); then :; else \
- test -z "$$log_list" || rm -f $$log_list; \
- test -z "$$trs_list" || rm -f $$trs_list; \
- fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+## Be sure to exit with the proper exit status (automake bug#9245). See
+## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
+ exit $$?;
## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
## It must also depend on the 'all' target. See automake bug#11252.
recheck: all %CHECK_DEPS%
+## See comments above in the check-TESTS recipe for why remove
+## $(TEST_SUITE_LOG) here.
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+## We must only consider tests that had an unexpected outcome (FAIL
+## or XPASS) in the earlier run.
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+## Remove newlines and normalize whitespace. Trailing (and possibly
+## leading) whitespace is known to cause segmentation faults on
+## Solaris 10 XPG4 make.
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+## Move the '.log' and '.trs' files associated with the tests to be
+## re-run out of the way, so that those tests will be re-run by the
+## "make test-suite.log" recursive invocation below.
+## Two tricky requirements:
+## - we must avoid extra files removal when running under "make -n";
+## - in case the test is a compiled program whose compilation fails,
+## we must ensure that any '.log' and '.trs' file referring to such
+## test are preserved, so that future "make recheck" invocations
+## will still try to re-compile and re-run it (automake bug#11791).
+## The extra contortions below cater to such requirements.
+ am_backupdir=.am-recheck; \
+ if $(am__make_dryrun); then :; else \
+ if test -n "$$trs_list$$log_list"; then \
+ { test ! -d $$am_backupdir || rm -rf $$am_backupdir; } \
+ && $(MKDIR_P) $$am_backupdir || exit 1; \
+ test -z "$$log_list" \
+ || mv -f $$log_list $$am_backupdir 2>/dev/null; \
+ test -z "$$trs_list" \
+ || mv -f $$trs_list $$am_backupdir 2>/dev/null; \
+ fi; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ st=$$?; \
+ if $(am__make_dryrun) || test ! -d $$am_backupdir; then :; else \
+ for f in $$log_list $$trs_list; do \
+ test -f $$f || mv $$am_backupdir/$$f . || exit 1; \
+ done; \
+ rm -rf $$am_backupdir || exit 1; \
+ fi; \
+ exit $$st;
AM_RECURSIVE_TARGETS += check recheck
diff --git a/lib/test-driver b/lib/test-driver
index e70a930..53e19b8 100755
--- a/lib/test-driver
+++ b/lib/test-driver
@@ -1,7 +1,7 @@
#! /bin/sh
# test-driver - basic testsuite driver script.
-scriptversion=2012-05-18.16; # UTC
+scriptversion=2012-06-27.10; # UTC
# Copyright (C) 2011-2012 Free Software Foundation, Inc.
#
@@ -45,7 +45,7 @@ Usage:
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
[--expect-failure={yes|no}] [--color-tests={yes|no}]
[--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
-The \`--test-name', \`--log-file' and \`--trs-file' options are mandatory.
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
END
}
@@ -74,7 +74,7 @@ while test $# -gt 0; do
done
if test $color_tests = yes; then
- # Keep this in sync with `lib/am/check.am:$(am__tty_colors)'.
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
red='[0;31m' # Red.
grn='[0;32m' # Green.
lgn='[1;32m' # Light green.
diff --git a/t/autohdrdry.sh b/t/autohdrdry.sh
index 3bd474e..af6c198 100755
--- a/t/autohdrdry.sh
+++ b/t/autohdrdry.sh
@@ -37,6 +37,6 @@ $MAKE
rm -f config.h
$MAKE -n
test -f stamp-h1
-test ! -r config.h
+test ! -e config.h
:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index e5c08a2..7cdc05c 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -739,6 +739,7 @@ t/parallel-tests8.sh \
t/parallel-tests9.sh \
t/parallel-tests10.sh \
t/parallel-tests-recheck-depends-on-all.sh \
+t/parallel-tests-recheck-pr11791.sh \
t/parallel-tests-exeext.sh \
t/parallel-tests-suffix.sh \
t/parallel-tests-suffix-prog.sh \
diff --git a/t/parallel-tests-recheck-pr11791.sh
b/t/parallel-tests-recheck-pr11791.sh
new file mode 100755
index 0000000..bfc55fa
--- /dev/null
+++ b/t/parallel-tests-recheck-pr11791.sh
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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/>.
+
+# parallel-tests: "make recheck" "make -k recheck" in the face of build
+# failures for the test cases. See automake bug#11791.
+
+required='cc native'
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = $(EXTRA_PROGRAMS)
+EXTRA_PROGRAMS = foo
+END
+
+echo 'int main (void) { return 1; }' > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
+
+$MAKE -k recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=1 pass=0 fail=1 xpass=0 xfail=0 skip=0 error=0
+
+# Introduce an error in foo.c, that should cause a compilation failure.
+$sleep
+echo choke me >> foo.c
+
+$MAKE recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+# We don't get a change to run the testsuite.
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && Exit 1
+# These shouldn't be removed, otherwise the next make recheck will do
+# nothing.
+test -f foo.log
+test -f foo.trs
+
+st=0; $MAKE -k recheck >stdout || st=$?
+cat stdout
+# Don't trust the exit status of "make -k" for non-GNU makes.
+if using_gmake && test $st -eq 0; then Exit 1; fi
+# We don't get a change to run the testsuite.
+$EGREP '(X?PASS|X?FAIL|SKIP|ERROR):' stdout && Exit 1
+test -f foo.log
+test -f foo.trs
+
+# "Repair" foo.c, and expect everything to work.
+$sleep
+echo 'int main (void) { return 0; }' > foo.c
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=1 pass=1 fail=0 xpass=0 xfail=0 skip=0 error=0
+test -f foo.log
+test -f foo.trs
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=0 pass=0 fail=0 xpass=0 xfail=0 skip=0 error=0
+test -f foo.log
+test -f foo.trs
+
+:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.1-174-g5fb73b0,
Stefano Lattarini <=