git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Derrick Stolee <stolee@gmail.com>
Cc: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
	"Derrick Stolee" <dstolee@microsoft.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 1/1] Makefile: add prove and coverage-prove targets
Date: Tue, 29 Jan 2019 11:46:54 -0500	[thread overview]
Message-ID: <20190129164654.GA6991@sigill.intra.peff.net> (raw)
In-Reply-To: <bb17112d-2869-741f-de13-3971a995032e@gmail.com>

On Tue, Jan 29, 2019 at 11:35:41AM -0500, Derrick Stolee wrote:

> > For people who don't have "prove" available, I think they could just do
> > "make -k test" to make sure the full suite runs. Should we perhaps be
> > doing that automatically in the sub-make run by coverage-test?
> 
> I wanted to avoid changing the existing behavior, if I could. But, if
> we can reasonably assume that anyone running 'make coverage-test' wants
> to run the full suite even with failures, then that's fine by me.

Another option would be to relay "-k" from the caller. I think it's not
enough to just use $(MAKE), but if you use $(MAKE) $(MAKEFLAGS), then
running "make -k coverage-test" from your coverage script would (I
think) do what you want.

> I see from the make docs that '-k' will still result in an error code
> at the end of the command, so no automation would result in an incorrect
> response to a failed test. Am I correct?

Yeah, that matches my understanding. I don't think you'd have to deal
with that failure code manually for coverage-report because it does not
depend on coverage-test (but obviously if you did "make coverage-test &&
make coverage-report", the "&&" needs to become a semicolon).

> >> +coverage-prove: coverage-clean-results coverage-compile
> >> +	$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
> >> +		DEFAULT_TEST_TARGET=prove -j1 prove
> >> +
> > 
> > You probably don't need to override DEFAULT_TEST_TARGET here, since the
> > "prove" target doesn't look at it. Likewise, "-j1" probably does nothing
> > here, since prove itself is a single target.
> 
> As Szeder mentioned, I can probably just drop the 'prove' target and use
> DEFAULT_TEST_TARGET instead. Or do we think anyone will want to use
> 'make prove' from root?

Yeah, that works. I typically do run prove, and I do run the tests from
the root, but DEFAULT_TEST_TARGET already makes it all work for me. So
yeah, I think it's fine to leave off the prove target until somebody
actually wants it.

> > I'm not sure why we want to enforce -j1 for these targets, but if it's
> > important to do so for the prove case, as well, you'd need to add it to
> > GIT_PROVE_OPTS.
> 
> The '-j1' is necessary because the coverage data is collected in a way that
> is not thread-safe. Our compile options also force single-threaded behavior.

Ah, right, I vaguely recall that now.

> I'll specifically override GIT_PROVE_OPTS here to force -j1, but also send
> -j1 to the 'make' command, too.

Makes sense.

-Peff

  reply	other threads:[~2019-01-29 16:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 14:56 [PATCH 0/1] Makefile: add prove and coverage-prove targets Derrick Stolee via GitGitGadget
2019-01-29 14:56 ` [PATCH 1/1] " Derrick Stolee via GitGitGadget
2019-01-29 15:20   ` Johannes Schindelin
2019-01-29 15:58   ` SZEDER Gábor
2019-01-29 16:37     ` Derrick Stolee
2019-01-29 16:49       ` Jeff King
2019-01-29 17:34     ` SZEDER Gábor
2019-01-29 18:10       ` Derrick Stolee
2019-01-29 20:49         ` Derrick Stolee
2019-01-29 21:58           ` SZEDER Gábor
2019-01-29 16:00   ` Jeff King
2019-01-29 16:35     ` Derrick Stolee
2019-01-29 16:46       ` Jeff King [this message]
2019-01-29 21:03     ` Ævar Arnfjörð Bjarmason
2019-01-29 22:38       ` Jeff King
2019-01-30 12:20       ` Johannes Schindelin
2019-01-30 13:08         ` Ævar Arnfjörð Bjarmason
2019-01-30 18:42           ` Johannes Schindelin
2019-01-30 19:32             ` Ævar Arnfjörð Bjarmason
2019-01-31  7:23               ` Johannes Schindelin
2019-01-29 17:05 ` [PATCH v2 0/1] " Derrick Stolee via GitGitGadget
2019-01-29 17:05   ` [PATCH v2 1/1] Makefile: add coverage-prove target Derrick Stolee via GitGitGadget

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

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

  git send-email \
    --in-reply-to=20190129164654.GA6991@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=stolee@gmail.com \
    --cc=szeder.dev@gmail.com \
    /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.
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).