diff --git a/README-hacking b/README-hacking index e7cc3b19..84f2024c 100644 --- a/README-hacking +++ b/README-hacking @@ -229,6 +229,9 @@ To run a specific set of tests, use -k (for "keyword"). For example: Both can be combined. $ make check-local TESTSUITEFLAGS='-j8 -k c++' +To rerun the tests that failed: + $ make recheck -j5 + ** Typical errors If the test suite shows failures such as the following one diff --git a/tests/local.mk b/tests/local.mk index 9f55e552..550328ea 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -94,6 +94,13 @@ clean-local: clean-local-tests clean-local-tests: test ! -f $(TESTSUITE) || $(TESTSUITE) -C %D% --clean +.PHONY: recheck +recheck: $(RUN_TESTSUITE_deps) + $(RUN_TESTSUITE) \ + $$(perl -n \ + -e 'if (/Summary of the failures/../Detailed failed tests/)' \ + -e '{ /^ *[0-9]+:/ && s/:.*//s && print }' %D%/testsuite.log) + check-local: $(RUN_TESTSUITE_deps) $(RUN_TESTSUITE)