Skip to content

Commit

Permalink
Merge branch 'ep/coverage-report-wants-test-to-have-run'
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
gitster committed May 25, 2022
2 parents 7a3eb28 + 96ddfec commit 296bdc4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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
Expand Down

0 comments on commit 296bdc4

Please sign in to comment.