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

Re: [PATCH v3 0/7] Detailed test coverage reports for Git

From
Thomas Rast <trast@student.ethz.ch>
Date
Jul 26, 2010, 07:43 UTC
Message-ID
<201007260943.41703.trast@student.ethz.ch>
In-Reply-To
<1280087565-24671-1-git-send-email-avarab@gmail.com>
Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> Ævar Arnfjörð Bjarmason (7):
>   gitignore: Ignore files generated by "make coverage"
>   Makefile: Include subdirectories in "make cover" reports
>   Makefile: Split out the untested functions target
>   Makefile: Add coverage-report-cover-db target
>   Makefile: Add coverage-report-cover-db-html target
>   t/README: A new section about test coverage
>   t/README: Add a note about the dangers of coverage chasing

Thanks a lot for shaping this up! I need the little patch below to accommodate my addiction for a newer compiler than the one standard for my distribution (but that was an issue before, too). It works very well, and the HTML output is quite nice.

Acked-by: Thomas Rast <trast@{inf,student}.ethz.ch>
-- 8< --
Subject: [PATCH] Makefile: make gcov invocation configurable

If you customize CC to use a different version of gcc, most likely you also need to use a different version of gcov. Make it configurable.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index fdfa4fe..81cb5ac 100644
--- a/Makefile
+++ b/Makefile
@@ -308,6 +308,7 @@ TCL_PATH = tclsh
 TCLTK_PATH = wish
 PTHREAD_LIBS = -lpthread
 PTHREAD_CFLAGS =
+GCOV = gcov
 
 export TCL_PATH TCLTK_PATH
 
@@ -2301,7 +2302,7 @@ coverage-build: coverage-clean
 
 coverage-report:
 	$(QUIET_GCOV)for dir in $(object_dirs); do \
-		gcov $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
+		$(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
 	done
 
 coverage-untested-functions: coverage-report
-- 
1.7.2.289.g93c76
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 9 of 10 in “Detailed test coverage reports for Git”
  1. 0/7 Detailed test coverage reports for GitÆvar Arnfjörð Bjarmason, Jul 25, 2010
  2. 1/7 gitignore: Ignore files generated by "make coverage"Ævar Arnfjörð Bjarmason, Jul 25, 2010
  3. 2/7 Makefile: Include subdirectories in "make cover" reportsÆvar Arnfjörð Bjarmason, Jul 25, 2010
  4. 3/7 Makefile: Split out the untested functions targetÆvar Arnfjörð Bjarmason, Jul 25, 2010
  5. 4/7 Makefile: Add coverage-report-cover-db targetÆvar Arnfjörð Bjarmason, Jul 25, 2010
  6. 5/7 Makefile: Add coverage-report-cover-db-html targetÆvar Arnfjörð Bjarmason, Jul 25, 2010
  7. 6/7 t/README: A new section about test coverageÆvar Arnfjörð Bjarmason, Jul 25, 2010
  8. 7/7 t/README: Add a note about the dangers of coverage chasingÆvar Arnfjörð Bjarmason, Jul 25, 2010
  9. Thomas RastJul 26, 2010
  10. Ævar Arnfjörð BjarmasonJul 26, 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.