Thread (10 messages) flat view 10 messages, 2 authors, 2016-06-15

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

From: Thomas Rast <hidden>
Date: 2016-06-15 22:49:11
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Ævar Arnfjörð Bjarmason wrote:
Æ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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help