From 83b03f377b6b3614497d81e97fccd4fe59299811 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 29 Mar 2009 01:17:51 +0100 Subject: [PATCH] parallel-tests: New target recheck-html. * lib/am/check.am [PARALLEL_TESTS] (recheck-html): New phony, recursive target. Factor common implementation with `check-html'. * doc/automake.texi (Tests): Document recheck-html. * tests/parallel-tests2.test: Test it. Signed-off-by: Ralf Wildenhues --- ChangeLog | 10 ++++++++++ doc/automake.texi | 5 ++++- lib/Automake/tests/Makefile.in | 12 +++++++----- lib/am/check.am | 9 +++++---- tests/Makefile.in | 12 +++++++----- tests/parallel-tests2.test | 6 ++++++ 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 57ca6d82f..cc711a0b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-03-29 Ralf Wildenhues + Akim Demaille + + parallel-tests: New target recheck-html. + * lib/am/check.am [PARALLEL_TESTS] (recheck-html): New phony, + recursive target. Factor common implementation with + `check-html'. + * doc/automake.texi (Tests): Document recheck-html. + * tests/parallel-tests2.test: Test it. + 2009-03-28 Ralf Wildenhues Akim Demaille diff --git a/doc/automake.texi b/doc/automake.texi index 84a8a216e..6ea02ed13 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -8510,10 +8510,13 @@ env RECHECK_LOGS= make -e check @item @trindex recheck +@trindex recheck-html You can ensure that all tests are rerun which have failed or passed unexpectedly, by running @code{make recheck} in the test directory. This convenience target will set @code{RECHECK_LOGS} appropriately -before invoking the main test driver. +before invoking the main test driver. The @code{recheck-html} target +does the same as @code{recheck} but again converts the resulting log +file in HTML format, like the @code{check-html} target. @end itemize In order to guarantee an ordering between tests even with @code{make diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in index 3ff98473c..a93a60a93 100644 --- a/lib/Automake/tests/Makefile.in +++ b/lib/Automake/tests/Makefile.in @@ -416,8 +416,9 @@ recheck: recheck-am # Be sure to run check-TESTS first, and then to convert the result. # Beware of concurrent executions. And expect check-TESTS to fail. -check-html: - @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then \ +check-html recheck-html: + @target=`echo $@ | sed 's/-html$$//'`; \ + if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \ rv=0; else rv=$$?; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ @@ -551,7 +552,8 @@ ps-am: uninstall-am: -.MAKE: check-am check-html install-am install-strip recheck-am +.MAKE: check-am check-html install-am install-strip recheck-am \ + recheck-html .PHONY: all all-am check check-TESTS check-am check-html clean \ clean-generic distclean distclean-generic distdir dvi dvi-am \ @@ -562,8 +564,8 @@ uninstall-am: install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am recheck recheck-TESTS recheck-am uninstall \ - uninstall-am + pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \ + uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/lib/am/check.am b/lib/am/check.am index d7ea96e17..a83f149af 100644 --- a/lib/am/check.am +++ b/lib/am/check.am @@ -275,14 +275,15 @@ recheck: recheck-am # Be sure to run check-TESTS first, and then to convert the result. # Beware of concurrent executions. And expect check-TESTS to fail. -check-html: - @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then \ +check-html recheck-html: + @target=`echo $@ | sed 's/-html$$//'`; \ + if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \ rv=0; else rv=$$?; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ exit $$rv -.PHONY: check-html -.MAKE: check-html +.PHONY: check-html recheck-html +.MAKE: check-html recheck-html else !%?PARALLEL_TESTS% diff --git a/tests/Makefile.in b/tests/Makefile.in index 6c481cabe..48e828c75 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1129,8 +1129,9 @@ recheck: recheck-am # Be sure to run check-TESTS first, and then to convert the result. # Beware of concurrent executions. And expect check-TESTS to fail. -check-html: - @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then \ +check-html recheck-html: + @target=`echo $@ | sed 's/-html$$//'`; \ + if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then \ rv=0; else rv=$$?; \ fi; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ @@ -1266,7 +1267,8 @@ ps-am: uninstall-am: -.MAKE: check-am check-html install-am install-strip recheck-am +.MAKE: check-am check-html install-am install-strip recheck-am \ + recheck-html .PHONY: all all-am check check-TESTS check-am check-html clean \ clean-generic clean-local distclean distclean-generic distdir \ @@ -1277,8 +1279,8 @@ uninstall-am: install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am recheck recheck-TESTS recheck-am uninstall \ - uninstall-am + pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \ + uninstall uninstall-am $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test index 61b05e8ec..f9e2a3c33 100755 --- a/tests/parallel-tests2.test +++ b/tests/parallel-tests2.test @@ -16,6 +16,7 @@ # Check parallel-tests features: # - check-html +# - recheck-html required=rst2html . ./defs-p || Exit 1 @@ -63,4 +64,9 @@ env TESTS=foo.test $MAKE -e check-html >stdout || { cat stdout; Exit 1; } cat stdout test -f mylog.html +# Create HTML output also with recheck-html +rm -f mylog.html +env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat stdout; Exit 1; } +cat stdout +test -f mylog.html : -- 2.47.2