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

Re: [PATCH 1/1] Makefile: add prove and coverage-prove targets

From
Derrick Stolee <stolee@gmail.com>
Date
Jan 29, 2019, 16:37 UTC
Message-ID
<a5ca8985-f877-b250-d186-32bef40092f5@gmail.com>
In-Reply-To
<20190129155827.GC13764@szeder.dev>
On 1/29/2019 10:58 AM, SZEDER Gábor wrote:
Show 7 quoted lines
> On Tue, Jan 29, 2019 at 06:56:08AM -0800, Derrick Stolee via GitGitGadget wrote:
>> +prove: all
>> +	$(MAKE) -C t/ prove
>> +
> 
> You don't need this 'prove' target in the "main" Makefile, because
> 'make test' will run the test suite using DEFAULT_TEST_TARGET anyway.
Thanks!
Show 21 quoted lines
>> +coverage-prove: coverage-clean-results coverage-compile
>> +	$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
>> +		DEFAULT_TEST_TARGET=prove -j1 prove
> 
> First I was wondering why do you need a dedicated 'coverage-prove'
> target, instead of letting DEFAULT_TEST_TARGET from the environment or
> from 'config.mak' do its thing.  But then I noticed in the hunk
> context, that, for some reason, the 'coverage-test' target hardcoded
> 'DEFAULT_TEST_TARGET=test -j1'.  Then I was wondering why would it
> want to do that, and stumbled upon commit c14cc77c11:
> 
>     coverage: set DEFAULT_TEST_TARGET to avoid using prove
>     
>     If the user sets DEFAULT_TEST_TARGET=prove in his config.mak, that
>     carries over into the coverage tests.  Which is really bad if he also
>     sets GIT_PROVE_OPTS=-j<..> as that completely breaks the coverage
>     runs.
>     
>     Instead of attempting to mess with the GIT_PROVE_OPTS, just force the
>     test target to 'test' so that we run under make, like we intended all
>     along.
Thanks for finding this!
 
> I'm afraid that this issue would badly affect 'coverage-prove' as well
> (I didn't try).  Or if doesn't (anymore?), then that should be
> mentioned in the commit message, and then perhaps it's time to remove
> that '-j1' from the 'coverage-test' target as well.

I'll fix this by forcing an update to GIT_PROVE_OPTS. It does limit our ability to use GIT_PROVE_OPTS as a pass-through, but at least this new target will have that assumption built in.

Thanks, -Stolee

Previous: SZEDER GáborNext: Jeff King
Message 5 of 22 in “Makefile: add prove and coverage-prove targets”
  1. 0/1 Makefile: add prove and coverage-prove targetsDerrick Stolee via GitGitGadget, Jan 29, 2019
  2. 1/1 Makefile: add prove and coverage-prove targetsDerrick Stolee via GitGitGadget, Jan 29, 2019
  3. Johannes SchindelinJan 29, 2019
  4. SZEDER GáborJan 29, 2019
  5. Derrick StoleeJan 29, 2019
  6. Jeff KingJan 29, 2019
  7. SZEDER GáborJan 29, 2019
  8. Derrick StoleeJan 29, 2019
  9. Derrick StoleeJan 29, 2019
  10. SZEDER GáborJan 29, 2019
  11. Jeff KingJan 29, 2019
  12. Derrick StoleeJan 29, 2019
  13. Jeff KingJan 29, 2019
  14. Ævar Arnfjörð BjarmasonJan 29, 2019
  15. Jeff KingJan 29, 2019
  16. Johannes SchindelinJan 30, 2019
  17. Ævar Arnfjörð BjarmasonJan 30, 2019
  18. Johannes SchindelinJan 30, 2019
  19. Ævar Arnfjörð BjarmasonJan 30, 2019
  20. Johannes SchindelinJan 31, 2019
  21. 0/1 Makefile: add prove and coverage-prove targetsDerrick Stolee via GitGitGadget, Jan 29, 2019
  22. 1/1 Makefile: add coverage-prove targetDerrick Stolee via GitGitGadget, Jan 29, 2019

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.