test_cmp: do not use "diff -u" on platforms that lack one
[git] / t / Makefile
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
10 SHELL_PATH ?= $(SHELL)
11 TAR ?= $(TAR)
12 RM ?= rm -f
13
14 # Shell quote;
15 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
16
17 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
18 TSVN = $(wildcard t91[0-9][0-9]-*.sh)
19
20 all: pre-clean
21         $(MAKE) aggregate-results-and-cleanup
22
23 $(T):
24         @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
25
26 pre-clean:
27         $(RM) -r test-results
28
29 clean:
30         $(RM) -r 'trash directory'.* test-results
31         $(RM) t????/cvsroot/CVSROOT/?*
32         $(RM) -r valgrind/bin
33
34 aggregate-results-and-cleanup: $(T)
35         $(MAKE) aggregate-results
36         $(MAKE) clean
37
38 aggregate-results:
39         '$(SHELL_PATH_SQ)' ./aggregate-results.sh test-results/t*-*
40
41 # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
42 full-svn-test:
43         $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
44         $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
45
46 valgrind:
47         GIT_TEST_OPTS=--valgrind $(MAKE)
48
49 .PHONY: pre-clean $(T) aggregate-results clean valgrind