Skip to content

Commit 0c38a95

Browse files
Thomas Rastgitster
authored andcommitted
coverage: split build target into compile and test
Confusingly, the coverage-build target in fact builds with gcov support _and runs tests_. Split it into two targets that actually are named after what they do. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab84621 commit 0c38a95

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,10 +2524,10 @@ check-builtins::
25242524

25252525
### Test suite coverage testing
25262526
#
2527-
.PHONY: coverage coverage-clean coverage-build coverage-report
2527+
.PHONY: coverage coverage-clean coverage-compile coverage-test coverage-report
25282528

25292529
coverage:
2530-
$(MAKE) coverage-build
2530+
$(MAKE) coverage-test
25312531
$(MAKE) coverage-report
25322532

25332533
object_dirs := $(sort $(dir $(OBJECTS)))
@@ -2543,8 +2543,10 @@ COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
25432543
COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov
25442544
GCOVFLAGS = --preserve-paths --branch-probabilities --all-blocks
25452545

2546-
coverage-build: coverage-clean
2546+
coverage-compile:
25472547
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all
2548+
2549+
coverage-test: coverage-clean-results coverage-compile
25482550
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
25492551
-j1 test
25502552

0 commit comments

Comments
 (0)