git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t/Makefile: add a rule to re-run previously-failed tests
@ 2016-06-29  7:02 Johannes Schindelin
  2016-06-29 17:18 ` Junio C Hamano
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Johannes Schindelin @ 2016-06-29  7:02 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano

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.schindelin@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

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-01-30 15:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29  7:02 [PATCH] t/Makefile: add a rule to re-run previously-failed tests Johannes Schindelin
2016-06-29 17:18 ` Junio C Hamano
2016-07-01 13:57   ` Johannes Schindelin
2016-06-30  6:37 ` Jeff King
2016-07-01 14:00   ` Johannes Schindelin
2016-08-29 13:46 ` [PATCH v2] " Johannes Schindelin
2016-08-30  8:43   ` Jeff King
2016-08-30 19:15     ` Junio C Hamano
2016-08-31 10:36       ` Johannes Schindelin
2016-09-01  3:59         ` Sverre Rabbelier
2016-09-01  8:27           ` Johannes Schindelin
2016-09-01 16:57             ` Sverre Rabbelier
2016-09-01 22:52               ` Junio C Hamano
2016-09-02  7:35                 ` Johannes Schindelin
2016-09-08 20:34                   ` Junio C Hamano
2016-08-30 20:48   ` Ævar Arnfjörð Bjarmason
2016-08-30 20:51     ` Jeff King
2016-08-30 20:58       ` Ævar Arnfjörð Bjarmason
2016-08-31 10:29         ` Johannes Schindelin
2016-08-31 13:42           ` Ævar Arnfjörð Bjarmason
2016-08-31 15:05             ` Johannes Schindelin
2016-09-02 10:25               ` Ævar Arnfjörð Bjarmason
2016-09-02 12:08                 ` Johannes Schindelin
2016-09-02 16:36                   ` Matthieu Moy
2016-09-04  7:55                     ` Johannes Schindelin
2016-09-04  9:19                       ` Matthieu Moy
2017-01-27 14:17   ` [PATCH v3] " Johannes Schindelin
2017-01-27 17:07     ` Jeff King
2017-01-27 17:21       ` Johannes Schindelin
2017-01-27 17:21     ` [PATCH v4] " Johannes Schindelin
2017-01-27 18:53       ` Junio C Hamano
2017-01-30 15:35         ` Johannes Schindelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).