1# Run tests
2#
3# Copyright (c) 2005 Junio C Hamano
4#
5
6-include ../config.mak
7
8#GIT_TEST_OPTS=--verbose --debug
9GIT_TEST_CMP ?= $(DIFF)
10SHELL_PATH ?= $(SHELL)
11TAR ?= $(TAR)
12RM ?= rm -f
13
14# Make sure test-lib.sh uses make's value of GIT_TEST_CMP
15export GIT_TEST_CMP
16
17# Shell quote;
18SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
19
20T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
21TSVN = $(wildcard t91[0-9][0-9]-*.sh)
22
23all: pre-clean
24 $(MAKE) aggregate-results-and-cleanup
25
26$(T):
27 @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
28
29pre-clean:
30 $(RM) -r test-results
31
32clean:
33 $(RM) -r 'trash directory'.* test-results
34 $(RM) t????/cvsroot/CVSROOT/?*
35 $(RM) -r valgrind/bin
36
37aggregate-results-and-cleanup: $(T)
38 $(MAKE) aggregate-results
39 $(MAKE) clean
40
41aggregate-results:
42 '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
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