git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] coverage: split build target into compile and test

From
Thomas Rast <trast@inf.ethz.ch>
Date
May 13, 2013, 21:27 UTC
Message-ID
<74a63334c1b7cd4c5bb43050dce256e125ca8c8b.1368479988.git.trast@inf.ethz.ch>
In-Reply-To
<cover.1368479988.git.trast@inf.ethz.ch>

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>
---
 Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 0f931a2..f98296b 100644
--- a/Makefile
+++ b/Makefile
@@ -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)))
@@ -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
 
-- 
1.8.3.rc1.400.g07d6e4a
Previous: Thomas RastNext: Thomas Rast
Message 2 of 8 in “Coverage support revisited”
  1. 0/4 Coverage support revisitedThomas Rast, May 13, 2013
  2. 1/4 coverage: split build target into compile and testThomas Rast, May 13, 2013
  3. 2/4 coverage: do not delete .gcno files before buildingThomas Rast, May 13, 2013
  4. 3/4 coverage: set DEFAULT_TEST_TARGET to avoid using proveThomas Rast, May 13, 2013
  5. 4/4 coverage: build coverage-untested-functions by defaultThomas Rast, May 13, 2013
  6. Junio C HamanoMay 13, 2013
  7. Jens LehmannMay 13, 2013
  8. Thomas RastMay 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.