diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-08-20 23:40:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-20 23:40:56 -0700 |
commit | 6da9d5bf47de3fdea23447259a2f1ab220a1b18f (patch) | |
tree | 57e657ccc3944d1c3fd4277b41dae967a2ee4f90 | |
parent | Update draft release notes for 1.6.1 (diff) | |
parent | Update t/.gitignore to ignore all trash directories (diff) | |
download | tgif-6da9d5bf47de3fdea23447259a2f1ab220a1b18f.tar.xz |
Merge branch 'js/parallel-test'
* js/parallel-test:
Update t/.gitignore to ignore all trash directories
Enable parallel tests
tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
t9700: remove useless check
-rw-r--r-- | t/.gitignore | 2 | ||||
-rw-r--r-- | t/Makefile | 8 | ||||
-rwxr-xr-x | t/t9700/test.pl | 3 | ||||
-rw-r--r-- | t/test-lib.sh | 8 |
4 files changed, 14 insertions, 7 deletions
diff --git a/t/.gitignore b/t/.gitignore index b27e280083..7dcbb232cd 100644 --- a/t/.gitignore +++ b/t/.gitignore @@ -1,2 +1,2 @@ -/trash directory +/trash directory* /test-results diff --git a/t/Makefile b/t/Makefile index 0d65cedaa6..ed49c20b16 100644 --- a/t/Makefile +++ b/t/Makefile @@ -14,7 +14,8 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH)) T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh) TSVN = $(wildcard t91[0-9][0-9]-*.sh) -all: pre-clean $(T) aggregate-results clean +all: pre-clean + $(MAKE) aggregate-results-and-cleanup $(T): @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS) @@ -25,6 +26,10 @@ pre-clean: clean: $(RM) -r 'trash directory' test-results +aggregate-results-and-cleanup: $(T) + $(MAKE) aggregate-results + $(MAKE) clean + aggregate-results: '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-* @@ -34,4 +39,3 @@ full-svn-test: $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8 .PHONY: pre-clean $(T) aggregate-results clean -.NOTPARALLEL: diff --git a/t/t9700/test.pl b/t/t9700/test.pl index 4d2312548a..851cea4a4b 100755 --- a/t/t9700/test.pl +++ b/t/t9700/test.pl @@ -14,10 +14,7 @@ use File::Temp; BEGIN { use_ok('Git') } # set up -our $repo_dir = "trash directory"; our $abs_repo_dir = Cwd->cwd; -die "this must be run by calling the t/t97* shell script(s)\n" - if basename(Cwd->cwd) ne $repo_dir; ok(our $r = Git->repository(Directory => "."), "open repository"); # config diff --git a/t/test-lib.sh b/t/test-lib.sh index 11c027571b..7f60b614ea 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -449,6 +449,11 @@ test_done () { # we will leave things as they are. say_color pass "passed all $msg" + + test -d "$remove_trash" && + cd "$(dirname "$remove_trash")" && + rm -rf "$(basename "$remove_trash")" + exit 0 ;; *) @@ -485,7 +490,8 @@ fi . ../GIT-BUILD-OPTIONS # Test repository -test="trash directory" +test="trash directory.$(basename "$0" .sh)" +remove_trash="$TEST_DIRECTORY/$test" rm -fr "$test" || { trap - exit echo >&5 "FATAL: Cannot prepare test area" |