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

[PATCH] t/Makefile: pass test opts to valgrind target properly

From
Jeff King <peff@peff.net>
Date
Jun 17, 2011, 08:29 UTC
Message-ID
<20110617082956.GA20414@sigill.intra.peff.net>

The valgrind target just reinvokes make with GIT_TEST_OPTS set to "--valgrind". However, it does this using an environment variable, which means GIT_TEST_OPTS in your config.mak would override it, and "make valgrind" would simply run the test suite without valgrind on.

Instead, we should pass GIT_TEST_OPTS on the command-line, overriding what's in config.mak, and take care to append to whatever the user has there already.

Signed-off-by: Jeff King <peff@peff.net>
---
I'm attempting to run the whole test suite under valgrind for 1.7.6-rc2.
It's been a while since I've done a whole run, as there were some false
positives in strspn on recent glibc which I've finally addressed.
We'll see what it comes up with later today. :)
 t/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/Makefile b/t/Makefile
index 47cbeb6..9046ec9 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -71,7 +71,7 @@ gitweb-test:
 	$(MAKE) $(TGITWEB)
 
 valgrind:
-	GIT_TEST_OPTS=--valgrind $(MAKE)
+	$(MAKE) GIT_TEST_OPTS="$(GIT_TEST_OPTS) --valgrind"
 
 # Smoke testing targets
 -include ../GIT-VERSION-FILE
-- 
1.7.6.rc1.38.g97f64
Next: Jeff King
Message 1 of 3 in “t/Makefile: pass test opts to valgrind target properly”
  1. t/Makefile: pass test opts to valgrind target properlyJeff King, Jun 17, 2011
  2. tests: link shell libraries into valgrind directoryJeff King, Jun 17, 2011
  3. Junio C HamanoJun 17, 2011

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.