Skip to content

Commit

Permalink
coverage: split build target into compile and test
Browse files Browse the repository at this point in the history
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 <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Thomas Rast authored and Junio C Hamano committed May 13, 2013
1 parent ab84621 commit 0c38a95
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2524,10 +2524,10 @@ check-builtins::

### Test suite coverage testing
#
.PHONY: coverage coverage-clean coverage-build coverage-report
.PHONY: coverage coverage-clean coverage-compile coverage-test coverage-report

coverage:
$(MAKE) coverage-build
$(MAKE) coverage-test
$(MAKE) coverage-report

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

coverage-build: coverage-clean
coverage-compile:
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all

coverage-test: coverage-clean-results coverage-compile
$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
-j1 test

Expand Down

0 comments on commit 0c38a95

Please sign in to comment.