File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ SHELL_PATH ?= $(SHELL)
11
11
PERL_PATH ?= /usr/bin/perl
12
12
TAR ?= $(TAR )
13
13
RM ?= rm -f
14
+ PROVE ?= prove
15
+ DEFAULT_TEST_TARGET ?= test
14
16
15
17
# Shell quote;
16
18
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH ) )
@@ -19,9 +21,15 @@ T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
19
21
TSVN = $(wildcard t91[0-9][0-9]-* .sh)
20
22
TGITWEB = $(wildcard t95[0-9][0-9]-* .sh)
21
23
22
- all : pre-clean
24
+ all : $(DEFAULT_TEST_TARGET )
25
+
26
+ test : pre-clean
23
27
$(MAKE ) aggregate-results-and-cleanup
24
28
29
+ prove : pre-clean
30
+ @echo " *** prove ***" ; GIT_CONFIG=.git/config $(PROVE ) --exec ' $(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS ) $(T ) :: $(GIT_TEST_OPTS )
31
+ $(MAKE ) clean
32
+
25
33
$(T ) :
26
34
@echo " *** $@ ***" ; GIT_CONFIG=.git/config ' $(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS )
27
35
Original file line number Diff line number Diff line change @@ -50,6 +50,12 @@ prove and other harnesses come with a lot of useful options. The
50
50
# Repeat until no more failures
51
51
$ prove -j 15 --state=failed,save ./t[0-9]*.sh
52
52
53
+ You can give DEFAULT_TEST_TARGET=prove on the make command (or define it
54
+ in config.mak) to cause "make test" to run tests under prove.
55
+ GIT_PROVE_OPTS can be used to pass additional options, e.g.
56
+
57
+ $ make DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS='--timer --jobs 16' test
58
+
53
59
You can also run each test individually from command line, like this:
54
60
55
61
$ sh ./t3010-ls-files-killed-modified.sh
You can’t perform that action at this time.
0 commit comments