summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-01-29 17:05:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-29 20:47:31 (GMT)
commit2299120f511e555b656d435e643a86beb36763d0 (patch)
tree2118e0ece2f15cb541576a075cc50e4f17a58583 /Makefile
parent16a465bc018d09e9d7bbbdc5f40a7fb99c21f8ef (diff)
downloadgit-2299120f511e555b656d435e643a86beb36763d0.zip
git-2299120f511e555b656d435e643a86beb36763d0.tar.gz
git-2299120f511e555b656d435e643a86beb36763d0.tar.bz2
Makefile: add coverage-prove target
Sometimes there are test failures in the 'pu' branch. This is somewhat expected for a branch that takes the very latest topics under development, and those sometimes have semantic conflicts that only show up during test runs. This also can happen when running the test suite with different GIT_TEST_* environment variables that interact in unexpected ways This causes a problem for the test coverage reports, as the typical 'make coverage-test coverage-report' run halts at the first failed test. If that test is early in the suite, then many valuable tests are not exercising the code and the coverage report becomes noisy with false positives. Add a new 'coverage-prove' target to the Makefile, modeled after the 'coverage-test' target. This compiles the source using the coverage flags, then runs the test suite using the 'prove' tool. Since the coverage machinery is not thread-safe, enforce that the tests are run in sequence by appending '-j1' to GIT_PROVE_OPTS. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1a44c81..23d8730 100644
--- a/Makefile
+++ b/Makefile
@@ -3077,6 +3077,11 @@ coverage-test: coverage-clean-results coverage-compile
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
DEFAULT_TEST_TARGET=test -j1 test
+coverage-prove: coverage-clean-results coverage-compile
+ $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
+ DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS="$(GIT_PROVE_OPTS) -j1" \
+ -j1 test
+
coverage-report:
$(QUIET_GCOV)for dir in $(object_dirs); do \
$(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \