While developing patch series, it is a good practice to run the test
suite from time to time, just to make sure that obvious bugs are caught
early. With complex patch series, it is common to run `make -j15 -k
test`, i.e. run the tests in parallel and not stop at the first failing
test but continue. This has the advantage of identifying possibly
multiple problems without having to wait for the complete test suite to
finish.

It is particularly important to reduce the turn-around time thusly on
Windows, where the test suite spends 45 minutes on the computer on which
this patch was developed.

It is the most convenient way to determine which tests failed after
running the entire test suite, in parallel, to look for left-over "trash
directory.t*" subdirectories in the t/ subdirectory.

This patch automates the process of determinig which tests failed
previously and re-running them; It turned out to be quite convenient
when trying to squash bugs that crept in during rebases.

Signed-off-by: Johannes Schindelin <johannes.schinde...@gmx.de>
---
Published-As: https://github.com/dscho/git/releases/tag/failing-tests-v1
 t/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/t/Makefile b/t/Makefile
index 18e2b28..1459a7f 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -35,6 +35,8 @@ all: $(DEFAULT_TEST_TARGET)
 test: pre-clean $(TEST_LINT)
        $(MAKE) aggregate-results-and-cleanup
 
+failed: $(patsubst trash,,$(patsubst directory.%,%.sh,$(wildcard trash\ 
directory.t[0-9]*)))
+
 prove: pre-clean $(TEST_LINT)
        @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' 
$(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
        $(MAKE) clean-except-prove-cache
-- 
2.9.0.118.g0e1a633

base-commit: cf4c2cfe52be5bd973a4838f73a35d3959ce2f43
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to