Skip to content

Detailed test coverage reports for Git

Ævar Arnfjörð Bjarmason git 3 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 2 repliesIn review
  2. v27 patches 9 repliesSuperseded
  3. v16 patches 12 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7gitignore: Ignore files generated by "make coverage".gitignore+4 -00 replies
2/7Makefile: Include subdirectories in "make cover" reportsMakefile+11 -30 replies
3/7Makefile: Split out the untested functions targetMakefile+2 -00 replies
4/7Makefile: Add coverage-report-cover-db target.gitignore Makefile+5 -00 replies
5/7Makefile: Add coverage-report-cover-db-html target.gitignore Makefile+5 -00 replies
6/7t/README: A new section about test coveraget/README+42 -00 replies
7/7t/README: Add a note about the dangers of coverage chasingt/README+9 -00 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJonathan NiederThomas Rast
SeriesA-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7Inspired-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/7] Detailed test coverage reports for Git

Here's v3 of the patch. It's almost entirely changes from Jonathan Nieder mentioned in the review for v2 (minus the bugs). Thanks Jonathan!

Here's the stat from v2:

    .gitignore |   12 ++++++------
    Makefile   |   15 ++++++++++-----
    t/README   |    8 ++++----
    3 files changed, 20 insertions(+), 15 deletions(-)

And the diff:

    diff --git a/.gitignore b/.gitignore
    index baed247..0a30a7e 100644
    --- a/.gitignore
    +++ b/.gitignore
    @@ -183,0 +184,6 @@
    +*.gcda
    +*.gcno
    +*.gcov
    +/coverage-untested-functions
    +/cover_db/
    +/cover_db_html/
    @@ -207,6 +212,0 @@
    -*.gcda
    -*.gcno
    -*.gcov
    -/coverage-untested-functions
    -/cover_db
    -/cover_db_html
    diff --git a/Makefile b/Makefile
    index b6975aa..fdfa4fe 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -1487,0 +1488 @@ ifndef V
    +	QUIET_GCOV     = @echo '   ' GCOV $@;
    @@ -2287,0 +2289,3 @@ coverage-clean:
    +	$(RM) coverage-untested-functions
    +	$(RM) -r cover_db/
    +	$(RM) -r cover_db_html/
    @@ -2290,0 +2295 @@ COVERAGE_LDFLAGS = $(CFLAGS)  -O0 -lgcov
    +GCOVFLAGS = --preserve-paths --branch-probabilities --all-blocks
    @@ -2298,2 +2303,2 @@ coverage-report:
    -	for dir in $(object_dirs); do \
    -		gcov --preserve-paths --branch-probabilities --all-blocks --object-directory=$$dir $$dir*.c; \
    +	$(QUIET_GCOV)for dir in $(object_dirs); do \
    +		gcov $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
    @@ -2305 +2310 @@ coverage-untested-functions: coverage-report
    -		| tee coverage-untested-functions
    +		> coverage-untested-functions
    @@ -2307 +2312 @@ coverage-untested-functions: coverage-report
    -coverage-report-cover-db: coverage-report
    +cover_db: coverage-report
    @@ -2310 +2315 @@ coverage-report-cover-db: coverage-report
    -coverage-report-cover-db-html: coverage-report-cover-db
    +cover_db_html: cover_db
    diff --git a/t/README b/t/README
    index 400e2da..4fe8d50 100644
    --- a/t/README
    +++ b/t/README
    @@ -270 +270 @@ Do:
    -    
    +
    @@ -534 +534 @@ directory):
    -    
    +
    @@ -554 +554 @@ Devel::Cover module. To install it do:
    -   
    +
    @@ -557 +557 @@ Then, at the top-level:
    -    make coverage-report-cover-db-html
    +    make cover_db_html

Æ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

 .gitignore |    6 ++++++
 Makefile   |   24 +++++++++++++++++++++---
 t/README   |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 3 deletions(-)