[PATCH] Make it easier to run individual tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following commands now work from the top-level source directory:
$ make t/t0001-init.sh
$ T=t0001-init.sh make test

Signed-off-by: David D Kilzer <ddkilzer@xxxxxxxxxx>
---
For the maint branch.

I'm so lazy I wanted a way to run tests from the primary Makefile.

 Makefile   |    3 +++
 t/Makefile |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index e70e320..eb0f7da 100644
--- a/Makefile
+++ b/Makefile
@@ -961,6 +961,9 @@ export NO_SVN_TESTS
 test: all
 	$(MAKE) -C t/ all
 
+t/t%.sh: all
+	T=`basename $@` $(MAKE) -C t/ all
+
 test-date$X: date.o ctype.o
 
 test-delta$X: diff-delta.o patch-delta.o
diff --git a/t/Makefile b/t/Makefile
index 72d7884..ae25561 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -11,7 +11,7 @@ RM ?= rm -f
 # Shell quote;
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
-T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
+T ?= $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 TSVN = $(wildcard t91[0-9][0-9]-*.sh)
 
 all: $(T) clean
-- 
1.5.3.4

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux