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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Æ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 <trast@xxxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]