git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "Michael J Gruber" <git@drmicha.warpmail.net>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: Re: [RFC PATCH] Makefile: new prove target for running the tests with TAP
Date: Tue, 26 Oct 2010 17:18:22 -0700	[thread overview]
Message-ID: <7vmxq0ebe9.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: 20101014172301.GA2770@sigill.intra.peff.net

Jeff King <peff@peff.net> writes:

> 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

  reply	other threads:[~2010-10-27  0:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14  8:53 [RFC PATCH] Makefile: new prove target for running the tests with TAP Michael J Gruber
2010-10-14  9:05 ` Ævar Arnfjörð Bjarmason
2010-10-14  9:21   ` Michael J Gruber
2010-10-14  9:33     ` Ævar Arnfjörð Bjarmason
2010-10-14 16:27 ` Jonathan Nieder
2010-10-14 17:23 ` Jeff King
2010-10-27  0:18   ` Junio C Hamano [this message]
2010-10-27  4:57     ` Jeff King
2010-10-27 11:00       ` Ævar Arnfjörð Bjarmason
2010-10-29 13:19         ` Michael J Gruber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vmxq0ebe9.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).