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

[PATCH 3/4] coverage: set DEFAULT_TEST_TARGET to avoid using prove

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

If the user sets DEFAULT_TEST_TARGET=prove in his config.mak, that carries over into the coverage tests. Which is really bad if he also sets GIT_PROVE_OPTS=-j<..> as that completely breaks the coverage runs.

Instead of attempting to mess with the GIT_PROVE_OPTS, just force the test target to 'test' so that we run under make, like we intended all along.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 99e4d09..153d24d 100644
--- a/Makefile
+++ b/Makefile
@@ -2551,7 +2551,7 @@ coverage-compile:
 
 coverage-test: coverage-clean-results coverage-compile
 	$(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
-		-j1 test
+		DEFAULT_TEST_TARGET=test -j1 test
 
 coverage-report:
 	$(QUIET_GCOV)for dir in $(object_dirs); do \
-- 
1.8.3.rc1.400.g07d6e4a
Previous: Thomas RastNext: Thomas Rast
Message 4 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.