Skip to content

Commit ecc486b

Browse files
committed
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
2 parents 4ba6bb2 + 93a04bb commit ecc486b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ all: $(DEFAULT_TEST_TARGET)
3535
test: pre-clean $(TEST_LINT)
3636
$(MAKE) aggregate-results-and-cleanup
3737

38+
failed:
39+
@failed=$$(cd '$(TEST_RESULTS_DIRECTORY_SQ)' && \
40+
grep -l '^failed [1-9]' *.counts | \
41+
sed -n 's/\.counts$$/.sh/p') && \
42+
test -z "$$failed" || $(MAKE) $$failed
43+
3844
prove: pre-clean $(TEST_LINT)
3945
@echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
4046
$(MAKE) clean-except-prove-cache

0 commit comments

Comments
 (0)