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

[PATCH 0/6] Detailed test coverage reports for Git

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jul 24, 2010, 20:50 UTC
Message-ID
<1280004663-4887-1-git-send-email-avarab@gmail.com>

Thomas Rast added initial test coverage support in 901c369af5. Expand on that so that coverage is extended to C files in builtin/, xdiff/ and compat/.

In addition I've added support for formatting the coverage reports with gcov2perl and Devel::Cover. Here's an example report formatted with these tools:

    http://v.nix.is/~avar/cover_db_html/coverage.html

With it we can see that Git currently has 77.1% test coverage for its core C code. It's also possible to dive in on a per-file basis, e.g. here you can see how sparse the tests for git-blame's -L option are, as I noted in a previous thread (and send partial patches):

    http://v.nix.is/~avar/cover_db_html/builtin-blame-c.html

I didn't yet look at how I could run the test suite so that we also get test coverage for our core Perl code. Devel::Cover obviously supports that, but it's just a matter of running the tests with the right environmental variables, and merging the gcov + Devel::Cover reports.

But that's a project for another day.
Ævar Arnfjörð Bjarmason (6):
  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
 .gitignore |   15 +++++++++++++++
 Makefile   |   16 +++++++++++++++-
 t/README   |   40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 70 insertions(+), 1 deletions(-)
Next: Ævar Arnfjörð Bjarmason
Message 1 of 19 in “Detailed test coverage reports for Git”
  1. 0/6 Detailed test coverage reports for GitÆvar Arnfjörð Bjarmason, Jul 24, 2010
  2. 1/6 gitignore: Ignore files generated by "make coverage"Ævar Arnfjörð Bjarmason, Jul 24, 2010
  3. 2/6 Makefile: Include subdirectories in "make cover" reportsÆvar Arnfjörð Bjarmason, Jul 24, 2010
  4. Thomas RastJul 24, 2010
  5. Ævar Arnfjörð BjarmasonJul 24, 2010
  6. Jonathan NiederJul 24, 2010
  7. Junio C HamanoJul 26, 2010
  8. 3/6 Makefile: Split out the untested functions targetÆvar Arnfjörð Bjarmason, Jul 24, 2010
  9. Thomas RastJul 24, 2010
  10. Ævar Arnfjörð BjarmasonJul 24, 2010
  11. 4/6 Makefile: Add coverage-report-cover-db targetÆvar Arnfjörð Bjarmason, Jul 24, 2010
  12. Thomas RastJul 24, 2010
  13. Ævar Arnfjörð BjarmasonJul 24, 2010
  14. 5/6 Makefile: Add coverage-report-cover-db-html targetÆvar Arnfjörð Bjarmason, Jul 24, 2010
  15. 6/6 t/README: A new section about test coverageÆvar Arnfjörð Bjarmason, Jul 24, 2010
  16. Jonathan NiederJul 24, 2010
  17. Jonathan NiederJul 24, 2010
  18. Ævar Arnfjörð BjarmasonJul 24, 2010
  19. Jonathan NiederJul 24, 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.