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

Re: [PATCH] Makefile: add a prerequisite to the coverage-report target

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 8, 2022, 20:10 UTC
Message-ID
<xmqqpmlrl4j2.fsf@gitster.g>
In-Reply-To
<20220408105443.192217-1-gitter.spiros@gmail.com>
Elia Pinto <gitter.spiros@gmail.com> writes:
Show 9 quoted lines
> @@ -3409,7 +3409,7 @@ coverage-prove: coverage-clean-results coverage-compile
>  		DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS="$(GIT_PROVE_OPTS) -j1" \
>  		-j1 test
>  
> -coverage-report:
> +coverage-report: coverage-test
>  	$(QUIET_GCOV)for dir in $(object_dirs); do \
>  		$(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
>  	done
I am not sure if this alone makes it a good change.

With the current set-up, you can run coverage-test or coverage-prove once, view coverage-report, shift your attention to elsewhere to address issues you saw in the report, and then decide to view the report again to remind yourself what you saw and what motivated you to work on your changes. Most likely this sequence would be followed by another run of coverage-test followed by coverage-report to compare what you saw before you made these changes with the covernage report after your changes.

If this were conditional, i.e. "ah, I see you haven't run any coverage test yet, so let me run it for you before showing the result" combined with "ok, I see you did run coverage test, so let me just show the result without running tests anew", then it would be a strict improvement from the status quo.

But with the patch as posted, wouldn't we unconditonally wipe the earlier result out? If so that may negatively affect established workflow of some people, I am afraid.

Thanks.
Previous: Elia PintoNext: Elia Pinto
Message 2 of 3 in “Makefile: add a prerequisite to the coverage-report target”
  1. Makefile: add a prerequisite to the coverage-report targetElia Pinto, Apr 8, 2022
  2. Junio C HamanoApr 8, 2022
  3. 1/1 Makefile: add a prerequisite to the coverage-report targetElia Pinto, Apr 9, 2022

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.