@matheusbsbs / matheus-bagliano / commits / 7432bd5fbd
Fork 0

Makefile: Add cover_db target

Add a target to convert the *.gcov files to a Devel::Cover database. That database can subsequently be formatted by the cover(1) tool which is included with Devel::Cover. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jul 25, 2010 at 19:52 UTC 7432bd5fbde117620e3b47d28e05827a334f42bf
2 files changed +5
.gitignore
+1
@@ -185,6 +185,7 @@
185 *.gcno
186 *.gcov
187 /coverage-untested-functions
188 +/cover_db/
189 *+
190 /config.mak
191 /autom4te.cache
Makefile
+4
@@ -2298,6 +2298,7 @@ coverage-clean:
2298 $(RM) $(addsuffix *.gcda,$(object_dirs))
2299 $(RM) $(addsuffix *.gcno,$(object_dirs))
2300 $(RM) coverage-untested-functions
2301 + $(RM) -r cover_db/
2302
2303 COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
2304 COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov
@@ -2317,3 +2318,6 @@ coverage-untested-functions: coverage-report
2318 grep '^function.*called 0 ' *.c.gcov \
2319 | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
2320 > coverage-untested-functions
2321 +
2322 +cover_db: coverage-report
2323 + gcov2perl -db cover_db *.gcov