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

Re: [RFC PATCH] Makefile: new prove target for running the tests with TAP

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 27, 2010, 00:18 UTC
Message-ID
<7vmxq0ebe9.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20101014172301.GA2770@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> On Thu, Oct 14, 2010 at 10:53:36AM +0200, Michael J Gruber wrote:
>
>> +prove: pre-clean
>> +	@echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
>> +	$(MAKE) clean
>> +
>
> I like the idea. I think the prove output is a little nicer for things
> like -j16, but it's a pain to construct the command line (especially as
> I use --root in GIT_TEST_OPTS to get a significant speedup).
>
> I wonder if anybody is really interested in switching between the
> "prove" and regular test targets, though. I would think you either like
> to use prove or not. So perhaps it makes more sense to put a
> configurable switch for the default target, like the patch below. Then
> you can just "make test" (or "make" in the test directory) as usual.
I kind of like this.  Perhaps with something like this squashed in?

-- >8 -- test: allow "prove" to be used as the main test harness

The prove output is a little easier to read for things like -j16.
---
 t/README |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/t/README b/t/README
index a1eb7c8..c548bf1 100644
--- a/t/README
+++ b/t/README
@@ -50,6 +50,12 @@ prove and other harnesses come with a lot of useful options. The
     # Repeat until no more failures
     $ prove -j 15 --state=failed,save ./t[0-9]*.sh
 
+You can give DEFAULT_TEST_TARGET=prove on the make command (or define it
+in config.mak) to cause "make test" to run tests under prove.
+GIT_PROVE_OPTS can be used to pass additional options, e.g.
+
+    $ make DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS='--timer --jobs 16' test
+
 You can also run each test individually from command line, like this:
 
     $ sh ./t3010-ls-files-killed-modified.sh
Previous: Jeff KingNext: Jeff King
Message 7 of 10 in “Makefile: new prove target for running the tests with TAP”
  1. Makefile: new prove target for running the tests with TAPMichael J Gruber, Oct 14, 2010
  2. Ævar Arnfjörð BjarmasonOct 14, 2010
  3. Michael J GruberOct 14, 2010
  4. Ævar Arnfjörð BjarmasonOct 14, 2010
  5. Jonathan NiederOct 14, 2010
  6. Jeff KingOct 14, 2010
  7. Junio C HamanoOct 27, 2010
  8. Jeff KingOct 27, 2010
  9. Ævar Arnfjörð BjarmasonOct 27, 2010
  10. Michael J GruberOct 29, 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.