From: Ralf Wildenhues Date: Fri, 10 Apr 2009 11:26:16 +0000 (+0200) Subject: parallel-tests: `clean recheck' should not rerun all tests. X-Git-Tag: v1.11~32^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79f2c3e24840ff300b586159ce4e7fd4a20042b8;p=thirdparty%2Fautomake.git parallel-tests: `clean recheck' should not rerun all tests. * lib/am/check.am (recheck, recheck-html): Do not rerun all tests if `$(TEST_SUITE_LOG)' does not exist. * tests/parallel-tests2.test: Adjust recheck test. * tests/parallel-tests9.test: Adjust recheck-html test. * NEWS: Update. Suggestion by Akim Demaille. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 8f4b36c46..c79631e0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-04-10 Ralf Wildenhues + + parallel-tests: `clean recheck' should not rerun all tests. + * lib/am/check.am (recheck, recheck-html): Do not rerun all + tests if `$(TEST_SUITE_LOG)' does not exist. + * tests/parallel-tests2.test: Adjust recheck test. + * tests/parallel-tests9.test: Adjust recheck-html test. + * NEWS: Update. + Suggestion by Akim Demaille. + 2009-04-08 Ralf Wildenhues Eric Blake diff --git a/NEWS b/NEWS index cf01518e8..64756fe59 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,9 @@ New in 1.10c: to the rules. + - The new `parallel-tests' targets `recheck' and `recheck-html' will not run + any tests that have not run yet. + Bugs fixed in 1.10c: * Long standing bugs: diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 3ccb40872..44e794a46 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -417,17 +417,13 @@ check-html: recheck recheck-html: @target=`echo $@ | sed 's,^re,,'`; \ list='$(TEST_LOGS)'; \ - if test -f $(TEST_SUITE_LOG); then \ - list=`for f in $$list; do \ - test -f $$f || continue; \ - if read line < $$f; then \ - case $$line in FAIL*|XPASS*) echo $$f;; esac; \ - else echo $$f; fi; \ - done | tr '\012\015' ' '`; \ - $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list"; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) $$target; \ - fi + list=`for f in $$list; do \ + test -f $$f || continue; \ + if read line < $$f; then \ + case $$line in FAIL*|XPASS*) echo $$f;; esac; \ + else echo $$f; fi; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list" .pl.log: @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post) diff --git a/lib/am/check.am b/lib/am/check.am index 90cb0334a..f0917a08f 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -279,23 +279,17 @@ AM_RECURSIVE_TARGETS += check-html ## Rechecking failures. ## ## -------------------- ## -## Rerun all FAILed or XPASSed tests (as well as all whose logs are out -## of date or do not exist). +## Rerun all FAILed or XPASSed tests. recheck recheck-html: @target=`echo $@ | sed 's,^re,,'`; \ list='$(TEST_LOGS)'; \ -## If the test suite has not been run yet, then run it in full - if test -f $(TEST_SUITE_LOG); then \ - list=`for f in $$list; do \ - test -f $$f || continue; \ - if read line < $$f; then \ - case $$line in FAIL*|XPASS*) echo $$f;; esac; \ - else echo $$f; fi; \ - done | tr '\012\015' ' '`; \ - $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list"; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) $$target; \ - fi + list=`for f in $$list; do \ + test -f $$f || continue; \ + if read line < $$f; then \ + case $$line in FAIL*|XPASS*) echo $$f;; esac; \ + else echo $$f; fi; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list" .PHONY: recheck recheck-html .MAKE: recheck recheck-html diff --git a/tests/Makefile.in b/tests/Makefile.in index e2fdaceef..9f21e73c6 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1150,17 +1150,13 @@ check-html: recheck recheck-html: @target=`echo $@ | sed 's,^re,,'`; \ list='$(TEST_LOGS)'; \ - if test -f $(TEST_SUITE_LOG); then \ - list=`for f in $$list; do \ - test -f $$f || continue; \ - if read line < $$f; then \ - case $$line in FAIL*|XPASS*) echo $$f;; esac; \ - else echo $$f; fi; \ - done | tr '\012\015' ' '`; \ - $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list"; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) $$target; \ - fi + list=`for f in $$list; do \ + test -f $$f || continue; \ + if read line < $$f; then \ + case $$line in FAIL*|XPASS*) echo $$f;; esac; \ + else echo $$f; fi; \ + done | tr '\012\015' ' '`; \ + $(MAKE) $(AM_MAKEFLAGS) $$target TEST_LOGS="$$list" .test.log: @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test index 3331a0c26..2a5fc6fa6 100755 --- a/tests/parallel-tests2.test +++ b/tests/parallel-tests2.test @@ -76,13 +76,13 @@ cat stdout test -f mylog.html # check-html and recheck-html should cause check_SCRIPTS to be created, -# and recheck-html should rerun all tests if check has not been run. +# and recheck-html should rerun no tests if check has not been run. $MAKE clean env TESTS=foo.test $MAKE -e check-html test -f bla $MAKE clean env TESTS=foo.test $MAKE -e recheck-html test -f bla -test -f foo.log +test ! -f foo.log test -f mylog.html : diff --git a/tests/parallel-tests9.test b/tests/parallel-tests9.test index a61df6090..6678920e1 100755 --- a/tests/parallel-tests9.test +++ b/tests/parallel-tests9.test @@ -73,12 +73,12 @@ cat stdout grep foo.test stdout || Exit 1 # Ensure that recheck builds check_SCRIPTS, and that -# recheck reruns all tests if check has not been run. +# recheck reruns nothing if check has not been run. $MAKE clean -$MAKE recheck && Exit 1 +$MAKE recheck test -f bla -test -f foo.log -test -f bar.log -test -f baz.log +test ! -f foo.log +test ! -f bar.log +test ! -f baz.log test -f mylog.log :