git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 6/6] Add test_harness make target for testing with prove(1)

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 7, 2010, 19:37 UTC
Message-ID
<1273261025-31523-6-git-send-email-avarab@gmail.com>
In-Reply-To
<1273261025-31523-1-git-send-email-avarab@gmail.com>

The --jobs option I'm supplying to prove(1) is not supported in all prove versions, some older ones (before Perl 5.10.1) don't have it. Anyone that's hacking Git probably has 5.10.1, and you can always use the old `make test` for non-parallel tests.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 Makefile   |    3 +++
 t/Makefile |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 910f471..c72c3d4 100644
--- a/Makefile
+++ b/Makefile
@@ -1912,6 +1912,9 @@ export NO_SVN_TESTS
 test: all
 	$(MAKE) -C t/ all
 
+test_harness: all
+	$(MAKE) -C t/ test_harness
+
 test-ctype$X: ctype.o
 
 test-date$X: date.o ctype.o
diff --git a/t/Makefile b/t/Makefile
index 25c559b..ef876e4 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -19,6 +19,9 @@ TSVN = $(wildcard t91[0-9][0-9]-*.sh)
 all: pre-clean
 	$(MAKE) aggregate-results-and-cleanup
 
+test_harness:
+	prove --jobs 9 ./t[0-9]*.sh
+
 $(T):
 	@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
 
-- 
1.7.1.dirty
Previous: Ævar Arnfjörð BjarmasonNext: Jakub Narebski
Message 8 of 17 in “Make test-lib.sh emit valid TAP format”
  1. 1/6 Make test-lib.sh emit valid TAP formatÆvar Arnfjörð Bjarmason, May 7, 2010
  2. 2/6 Move t6000lib.sh to lib-*Ævar Arnfjörð Bjarmason, May 7, 2010
  3. Jakub NarebskiMay 7, 2010
  4. 3/6 Skip tests in a way that makes sense under TAPÆvar Arnfjörð Bjarmason, May 7, 2010
  5. 4/6 Turn setup code in t2007-checkout-symlink.sh into a testÆvar Arnfjörð Bjarmason, May 7, 2010
  6. Jakub NarebskiMay 7, 2010
  7. 5/6 We use TAP so the Perl test can run without scaffoldingÆvar Arnfjörð Bjarmason, May 7, 2010
  8. 6/6 Add test_harness make target for testing with prove(1)Ævar Arnfjörð Bjarmason, May 7, 2010
  9. Jakub NarebskiMay 7, 2010
  10. Junio C HamanoMay 8, 2010
  11. Tor ArntsenMay 9, 2010
  12. Sverre RabbelierMay 7, 2010
  13. Ævar Arnfjörð BjarmasonMay 7, 2010
  14. 1/6 Make test-lib.sh emit valid TAP formatÆvar Arnfjörð Bjarmason, May 7, 2010
  15. Ævar Arnfjörð BjarmasonMay 15, 2010
  16. Jakub NarebskiMay 7, 2010
  17. Ævar Arnfjörð BjarmasonMay 7, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.