1# Run tests
2#
3# Copyright (c) 2005 Junio C Hamano
4#
5
6-include ../config.mak.autogen
7-include ../config.mak
8
9#GIT_TEST_OPTS=--verbose --debug
10SHELL_PATH ?= $(SHELL)
11TAR ?= $(TAR)
12RM ?= rm -f
13
14# Shell quote;
15SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
16
17T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
18TSVN = $(wildcard t91[0-9][0-9]-*.sh)
19
20all: pre-clean
21 $(MAKE) aggregate-results-and-cleanup
22
23$(T):
24 @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
25
26pre-clean:
27 $(RM) -r test-results
28
29clean:
30 $(RM) -r 'trash directory'.* test-results
31 $(RM) t????/cvsroot/CVSROOT/?*
32 $(RM) -r valgrind/bin
33 $(RM) .prove
34
35aggregate-results-and-cleanup: $(T)
36 $(MAKE) aggregate-results
37 $(MAKE) clean
38
39aggregate-results:
40 for f in test-results/t*-*.counts; do \
41 echo "$$f"; \
42 done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
43
44# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
45full-svn-test:
46 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
47 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
48
49valgrind:
50 GIT_TEST_OPTS=--valgrind $(MAKE)
51
52.PHONY: pre-clean $(T) aggregate-results clean valgrind