зеркало из https://github.com/microsoft/git.git
Merge branch 'mg/make-prove'
* mg/make-prove: test: allow running the tests under "prove"
This commit is contained in:
Коммит
4739c19d7f
10
t/Makefile
10
t/Makefile
|
@ -11,6 +11,8 @@ SHELL_PATH ?= $(SHELL)
|
||||||
PERL_PATH ?= /usr/bin/perl
|
PERL_PATH ?= /usr/bin/perl
|
||||||
TAR ?= $(TAR)
|
TAR ?= $(TAR)
|
||||||
RM ?= rm -f
|
RM ?= rm -f
|
||||||
|
PROVE ?= prove
|
||||||
|
DEFAULT_TEST_TARGET ?= test
|
||||||
|
|
||||||
# Shell quote;
|
# Shell quote;
|
||||||
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
|
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
|
||||||
|
@ -19,9 +21,15 @@ T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
|
||||||
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
|
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
|
||||||
TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
|
TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
|
||||||
|
|
||||||
all: pre-clean
|
all: $(DEFAULT_TEST_TARGET)
|
||||||
|
|
||||||
|
test: pre-clean
|
||||||
$(MAKE) aggregate-results-and-cleanup
|
$(MAKE) aggregate-results-and-cleanup
|
||||||
|
|
||||||
|
prove: pre-clean
|
||||||
|
@echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
|
||||||
|
$(MAKE) clean
|
||||||
|
|
||||||
$(T):
|
$(T):
|
||||||
@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
|
@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
|
||||||
|
|
||||||
|
|
6
t/README
6
t/README
|
@ -50,6 +50,12 @@ prove and other harnesses come with a lot of useful options. The
|
||||||
# Repeat until no more failures
|
# Repeat until no more failures
|
||||||
$ prove -j 15 --state=failed,save ./t[0-9]*.sh
|
$ prove -j 15 --state=failed,save ./t[0-9]*.sh
|
||||||
|
|
||||||
|
You can give DEFAULT_TEST_TARGET=prove on the make command (or define it
|
||||||
|
in config.mak) to cause "make test" to run tests under prove.
|
||||||
|
GIT_PROVE_OPTS can be used to pass additional options, e.g.
|
||||||
|
|
||||||
|
$ make DEFAULT_TEST_TARGET=prove GIT_PROVE_OPTS='--timer --jobs 16' test
|
||||||
|
|
||||||
You can also run each test individually from command line, like this:
|
You can also run each test individually from command line, like this:
|
||||||
|
|
||||||
$ sh ./t3010-ls-files-killed-modified.sh
|
$ sh ./t3010-ls-files-killed-modified.sh
|
||||||
|
|
Загрузка…
Ссылка в новой задаче