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

[PATCH] makefile: add ability to run specific test files

From
Jacob Keller <jacob.e.keller@intel.com>
Date
Jul 9, 2014, 22:36 UTC
Message-ID
<1404945412-10197-2-git-send-email-jacob.e.keller@intel.com>

Running a specific test file manually does not obtain the exact environment setup by the Makefile. Add ability to run any of the tests in the t/ directory so that a user can more quickly debug a failing test. Otherwise, the entire test suite needs to be run, which can take a vary long time.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 07ea1058379a..86bdc4ed1ee9 100644
--- a/Makefile
+++ b/Makefile
@@ -2262,13 +2262,18 @@ export TEST_NO_MALLOC_CHECK
 
 ### Testing rules
 
+T = $(sort $(wildcard t/t[0-9][0-9][0-9][0-9]-*.sh))
+
+$(T):
+	$(MAKE) -C t $(notdir $@)
+
 test: all
 	$(MAKE) -C t/ all
 
 perf: all
 	$(MAKE) -C t/perf/ all
 
-.PHONY: test perf
+.PHONY: test perf $(T)
 
 test-ctype$X: ctype.o
 
-- 
2.0.1.475.g9b8d714
Next: Junio C Hamano
Message 1 of 7 in “makefile: add ability to run specific test files”
  1. makefile: add ability to run specific test filesJacob Keller, Jul 9, 2014
  2. Junio C HamanoJul 9, 2014
  3. Keller, Jacob EJul 9, 2014
  4. Junio C HamanoJul 10, 2014
  5. Keller, Jacob EJul 10, 2014
  6. Jeff KingJul 10, 2014
  7. Keller, Jacob EJul 10, 2014

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.