From: Stefano Lattarini Date: Sun, 1 Jul 2012 17:28:51 +0000 (+0200) Subject: [ng] recheck: improve the fix for bug#11791 to use more GNU make features X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1b72b8f69b934116018c4d9fcb42dabe89e14a5;p=thirdparty%2Fautomake.git [ng] recheck: improve the fix for bug#11791 to use more GNU make features * lib/am/parallel-tests.am: Here, and to generally have a "look and feel" more in the Automake-NG style. Also, improve comments while we are at it. * Makefile.am (XFAIL_TESTS): Remove 't/test-missing.sh', as the changes in 'parallel-tests.am' have restored some semantics that had been messed up in the previous merge (where 't/test-missing.sh' started failing). Signed-off-by: Stefano Lattarini --- diff --git a/Makefile.am b/Makefile.am index dc03a4e1a..c3be172f1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -334,7 +334,6 @@ perl_fake_XFAIL_TESTS = \ XFAIL_TESTS = \ t/all.sh \ - t/test-missing.sh \ t/override-suggest-local.sh \ t/yacc-bison-skeleton-cxx.sh \ t/yacc-bison-skeleton.sh \ diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am index 41ae3926a..83b90d511 100644 --- a/lib/am/parallel-tests.am +++ b/lib/am/parallel-tests.am @@ -261,12 +261,6 @@ am__mostlyclean_files += $(am__test_results) $(am__test_logs) # $(TEST_LOGS) is a published interface. TEST_LOGS = $(am__test_logs) -# Leading 'am--fnord' is there to ensure the list of targets does not -# exand to empty, as could happen e.g. with make check TESTS=''. -am--fnord $(am__test_logs) $(am__test_results): $(am__force_recheck) -am--force-recheck: - @: - $(TEST_SUITE_LOG): $(am__test_logs) $(am__test_results) @$(am__sh_e_setup); $(am__tty_colors); \ fatal () { echo "fatal: making $@: $$*" >&2; exit 1; }; \ @@ -423,8 +417,17 @@ recheck: all %CHECK_DEPS% | $(am__list_recheck_tests)` || exit 1; \ ## Remove newlines and normalize whitespace. bases=`echo $$bases`; \ - $(MAKE) $(TEST_SUITE_LOG) am__test_bases="$$bases" \ - am__force_recheck=am--force-recheck + $(MAKE) $(TEST_SUITE_LOG) .am/doing-recheck=yes am__test_bases="$$bases" .PHONY: recheck +## One tricky requirement of the "recheck" target is that, in case (say) +## 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). This indirection is aimed at +## satisying such a requirement. +!ifeq ($(.am/doing-recheck),yes) +!$(am__test_logs) $(am__test_results): .am/nil +!endif + AM_RECURSIVE_TARGETS += check recheck