From 72ac29f10130ef8f450f8fcb71762d56ada18d4e Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 21 Jul 2012 10:13:58 +0200 Subject: [PATCH] [ng] recheck: don't exceed command line limits, even with many failed tests Related to automake bug#7868. * lib/am/parallel-tests.sh (recheck): Arrange recursive make invocation to pass the list of tests to be rechecked in the make standard input rather than on the make command line. (am__test_bases): Only define if not already set, to make the new idiom referenced above work as expected. * Makefile.am (XFAIL_TESTS): Remove 't/parallel-tests-many.sh' once again. Signed-off-by: Stefano Lattarini --- Makefile.am | 1 - lib/am/parallel-tests.am | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index 290d5f423..54de62fb9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -350,7 +350,6 @@ XFAIL_TESTS = \ t/interp3.sh \ t/java-nobase.sh \ t/objext-pr10128.sh \ - t/parallel-tests-many.sh \ t/pr8365-remake-timing.sh \ t/remake-am-pr10111.sh \ t/remake-m4-pr10111.sh \ diff --git a/lib/am/parallel-tests.am b/lib/am/parallel-tests.am index 08012fce4..048cdfada 100644 --- a/lib/am/parallel-tests.am +++ b/lib/am/parallel-tests.am @@ -302,8 +302,8 @@ END { \ am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # This supports runtime overriding of $(TESTS) and $(XFAIL_TESTS). -am__test_bases = \ - $(call am__memoize,am__test_bases,$(call am__get_test_bases,$(TESTS))) +!am__test_bases ?= \ +! $(call am__memoize,am__test_bases,$(call am__get_test_bases,$(TESTS))) am__xfail_test_bases = \ $(call am__memoize,am__xfail_test_bases,$(call am__get_test_bases,$(XFAIL_TESTS))) @@ -476,11 +476,10 @@ recheck: all %CHECK_DEPS% | $(am__list_recheck_tests)` || exit 1; \ ## Remove newlines and normalize whitespace. bases=`echo $$bases`; \ -## FIXME: This could still cause command line length limits to be exceeded. -## But that could happen only if a huge number of tests had failed in the -## previous run, in which case we could expect the user to run "make check" -## for safeness. So, is this limitation worth lifting or not? - $(MAKE) $(TEST_SUITE_LOG) .am/doing-recheck=yes am__test_bases="$$bases" +## Re-run the relevant tests, without hitting command-line length limits. + echo am__test_bases="$$bases" | \ + $(MAKE) -f- -f$(firstword $(MAKEFILE_LIST)) \ + $(TEST_SUITE_LOG) .am/doing-recheck=yes .PHONY: recheck ## One tricky requirement of the "recheck" target is that, in case (say) -- 2.47.2