git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David D Kilzer <ddkilzer@kilzer.net>
To: git@vger.kernel.org
Cc: gitster@pobox.com, David D Kilzer <ddkilzer@kilzer.net>
Subject: [PATCH] Make it easier to run individual tests
Date: Thu,  8 Nov 2007 03:31:12 -0800	[thread overview]
Message-ID: <1194521472-13172-1-git-send-email-ddkilzer@kilzer.net> (raw)

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@kilzer.net>
---
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

                 reply	other threads:[~2007-11-08 11:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1194521472-13172-1-git-send-email-ddkilzer@kilzer.net \
    --to=ddkilzer@kilzer.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).