aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-02-03 11:25:19 -0800
committerJunio C Hamano <gitster@pobox.com>2017-02-03 11:25:19 -0800
commitecc486b1f8ad5962ed51bcbffbba75ff2bc633ad (patch)
tree3cab8f0ba9f437a77a54f1e2319af7d1cef6df11
parent4ba6bb2d1792bd799b295b879461ee5453faab3e (diff)
parent93a04bb105f30f5578a187c49066ccda71fe7cde (diff)
downloadgit-ecc486b1f8ad5962ed51bcbffbba75ff2bc633ad.tar.gz
git-ecc486b1f8ad5962ed51bcbffbba75ff2bc633ad.tar.xz
Merge branch 'js/re-running-failed-tests'
"make -C t failed" will now run only the tests that failed in the previous run. This is usable only when prove is not use, and gives a useless error message when run after "make clean", but otherwise is serviceable. * js/re-running-failed-tests: t/Makefile: add a rule to re-run previously-failed tests
-rw-r--r--t/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/Makefile b/t/Makefile
index d613935f1..1bb06c36f 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -35,6 +35,12 @@ all: $(DEFAULT_TEST_TARGET)
test: pre-clean $(TEST_LINT)
$(MAKE) aggregate-results-and-cleanup
+failed:
+ @failed=$$(cd '$(TEST_RESULTS_DIRECTORY_SQ)' && \
+ grep -l '^failed [1-9]' *.counts | \
+ sed -n 's/\.counts$$/.sh/p') && \
+ test -z "$$failed" || $(MAKE) $$failed
+
prove: pre-clean $(TEST_LINT)
@echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
$(MAKE) clean-except-prove-cache