summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-05-25 23:42:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-05-25 23:42:47 (GMT)
commit296bdc4f36f62590c7cb4f709ab7fc1f2e507d19 (patch)
treed692d76ec6d7d17ffd50416cf8c0826afa334fec
parent7a3eb286977746bc09a5de7682df0e5a7085e17c (diff)
parent96ddfecc5b9cd8d8b7b6316ed2523a489e879682 (diff)
downloadgit-296bdc4f36f62590c7cb4f709ab7fc1f2e507d19.zip
git-296bdc4f36f62590c7cb4f709ab7fc1f2e507d19.tar.gz
git-296bdc4f36f62590c7cb4f709ab7fc1f2e507d19.tar.bz2
Merge branch 'ep/coverage-report-wants-test-to-have-run'
"make coverage-report" without first running "make coverage" did not produce any meaningful result, which has been corrected. * ep/coverage-report-wants-test-to-have-run: Makefile: add a prerequisite to the coverage-report target
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 61aadf3..18ca674 100644
--- a/Makefile
+++ b/Makefile
@@ -3410,6 +3410,7 @@ coverage-clean-results:
$(RM) coverage-untested-functions
$(RM) -r cover_db/
$(RM) -r cover_db_html/
+ $(RM) coverage-test.made
coverage-clean: coverage-clean-results
$(RM) $(addsuffix *.gcno,$(object_dirs))
@@ -3424,13 +3425,17 @@ coverage-compile:
coverage-test: coverage-clean-results coverage-compile
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
DEFAULT_TEST_TARGET=test -j1 test
+ touch coverage-test.made
+
+coverage-test.made:
+ $(MAKE) coverage-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:
+coverage-report: coverage-test.made
$(QUIET_GCOV)for dir in $(object_dirs); do \
$(GCOV) $(GCOVFLAGS) --object-directory=$$dir $$dir*.c || exit; \
done