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

Re: Git Test Coverage Report (Thurs. June 27)

From
Jeff King <peff@peff.net>
Date
Jun 29, 2019, 05:15 UTC
Message-ID
<20190629051559.GA8908@sigill.intra.peff.net>
In-Reply-To
<c2e0ceef-c14d-ea1d-7522-eab0bf2e48ce@gmail.com>
On Fri, Jun 28, 2019 at 09:36:14PM -0400, Derrick Stolee wrote:
Show 7 quoted lines
> > Still, if it's not too painful to add them in time-wise, it probably
> > makes sense for the coverage tests to be as exhaustive as possible.
> 
> Unfortunately, even running the t9*.sh tests once (among the two runs:
> first with default options and then with several GIT_TEST_* options)
> causes the build to go beyond the three hour limit, and the builds time
> out.

Is that because you're running the tests sequentially, due to the corruption of the gcov files?

I think something like this would work to get per-script profiles:
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 4b346467df..81841191d2 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -369,6 +369,9 @@ TZ=UTC
 export LANG LC_ALL PAGER TZ
 EDITOR=:
 
+GCOV_PREFIX=$TEST_RESULTS_BASE.gcov
+export GCOV_PREFIX
+
 # GIT_TEST_GETTEXT_POISON should not influence git commands executed
 # during initialization of test-lib and the test repo. Back it up,
 # unset and then restore after initialization is finished.


And then you can reassemble that with something like this (gcov-tool
comes with gcc):

  for i in t/test-results/t*.gcov; do
    echo >&2 "Merging $i..."
    gcov-tool merge -o . . "$i/$PWD"
  done

The merge is pretty slow, though (and necessarily serial). I wonder if
you'd do better to dump gcov output from each directory and then collate
it as text. I've heard lcov also has better support for handling
multiple runs like this.

-Peff
Previous: Derrick StoleeNext: Duy Nguyen
Message 40 of 43 in “Git Test Coverage Report (Thurs. June 27)”
  1. Derrick StoleeJun 27, 2019
  2. Derrick StoleeJun 27, 2019
  3. Jeff KingJun 28, 2019
  4. 0/6 easy bulk commit creation in testsJeff King, Jun 28, 2019
  5. 1/6 test-lib: introduce test_commit_bulkJeff King, Jun 28, 2019
  6. Derrick StoleeJun 28, 2019
  7. Junio C HamanoJun 28, 2019
  8. Jeff KingJun 29, 2019
  9. Junio C HamanoJun 28, 2019
  10. Jeff KingJun 29, 2019
  11. Ævar Arnfjörð BjarmasonJun 28, 2019
  12. Jeff KingJun 29, 2019
  13. Eric SunshineJun 28, 2019
  14. SZEDER GáborJun 28, 2019
  15. Eric SunshineJun 28, 2019
  16. Jeff KingJun 29, 2019
  17. SZEDER GáborJun 29, 2019
  18. Junio C HamanoJul 1, 2019
  19. Jeff KingJun 29, 2019
  20. 2/6 t5310: increase the number of bitmapped commitsJeff King, Jun 28, 2019
  21. 3/6 t3311: use test_commit_bulkJeff King, Jun 28, 2019
  22. 4/6 t5702: use test_commit_bulkJeff King, Jun 28, 2019
  23. 5/6 t5703: use test_commit_bulkJeff King, Jun 28, 2019
  24. 6/6 t6200: use test_commit_bulkJeff King, Jun 28, 2019
  25. Johannes SchindelinJun 28, 2019
  26. Jeff KingJun 29, 2019
  27. Elijah NewrenJun 29, 2019
  28. Jeff KingJun 30, 2019
  29. Ævar Arnfjörð BjarmasonJun 28, 2019
  30. Jeff KingJun 29, 2019
  31. 1/6 test-lib: introduce test_commit_bulkJeff King, Jun 29, 2019
  32. Junio C HamanoJul 1, 2019
  33. Jeff KingJul 2, 2019
  34. Junio C HamanoJul 1, 2019
  35. Jeff KingJul 2, 2019
  36. Jeff KingJun 28, 2019
  37. Derrick StoleeJun 28, 2019
  38. Jeff KingJun 28, 2019
  39. Derrick StoleeJun 29, 2019
  40. Jeff KingJun 29, 2019
  41. Duy NguyenJun 28, 2019
  42. Derrick StoleeJun 28, 2019
  43. Christian CouderJun 28, 2019

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.