]> git.ipfire.org Git - thirdparty/git.git/blame - t/Makefile
t/gitweb-lib.sh: Add support for GITWEB_TEST_INSTALLED
[thirdparty/git.git] / t / Makefile
CommitLineData
e1970ce4
JH
1# Run tests
2#
3# Copyright (c) 2005 Junio C Hamano
4#
d6928ebd 5
b2b0026e 6-include ../config.mak.autogen
c14417c4
JK
7-include ../config.mak
8
d6928ebd 9#GIT_TEST_OPTS=--verbose --debug
edde7a8b 10SHELL_PATH ?= $(SHELL)
4678a5cd 11PERL_PATH ?= /usr/bin/perl
455a7f32 12TAR ?= $(TAR)
4cb08df5 13RM ?= rm -f
e1970ce4 14
4769948a 15# Shell quote;
39c015c5 16SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
4769948a 17
e1970ce4 18T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
60d02ccc 19TSVN = $(wildcard t91[0-9][0-9]-*.sh)
e1970ce4 20
e3df89a4
JS
21all: pre-clean
22 $(MAKE) aggregate-results-and-cleanup
23fc63bf
AR
23
24$(T):
9c3796fc 25 @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
e1970ce4 26
f8d5ffc2
SR
27pre-clean:
28 $(RM) -r test-results
29
902d960b 30clean:
81db4abf 31 $(RM) -r 'trash directory'.* test-results
34b383e7 32 $(RM) -r valgrind/bin
9a3028b9 33 $(RM) .prove
23fc63bf 34
e3df89a4
JS
35aggregate-results-and-cleanup: $(T)
36 $(MAKE) aggregate-results
37 $(MAKE) clean
38
f8d5ffc2 39aggregate-results:
7ea3ddf8 40 for f in test-results/t*-*.counts; do \
6508eedf
BC
41 echo "$$f"; \
42 done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
f8d5ffc2 43
60d02ccc
EW
44# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
45full-svn-test:
ed92f170 46 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
b9c85187 47 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
60d02ccc 48
7f6fdea1 49valgrind:
3da93652 50 GIT_TEST_OPTS=--valgrind $(MAKE)
7f6fdea1 51
b6b84d1b 52# Smoke testing targets
b6b84d1b
ÆAB
53-include ../GIT-VERSION-FILE
54uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo unknown')
55uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
56
57test-results:
58 mkdir -p test-results
59
617344d7 60test-results/git-smoke.tar.gz: test-results
b6b84d1b
ÆAB
61 $(PERL_PATH) ./harness \
62 --archive="test-results/git-smoke.tar.gz" \
63 $(T)
64
65smoke: test-results/git-smoke.tar.gz
66
67SMOKE_UPLOAD_FLAGS =
68ifdef SMOKE_USERNAME
69 SMOKE_UPLOAD_FLAGS += -F username="$(SMOKE_USERNAME)" -F password="$(SMOKE_PASSWORD)"
70endif
e38efac8
ÆAB
71ifdef SMOKE_COMMENT
72 SMOKE_UPLOAD_FLAGS += -F comments="$(SMOKE_COMMENT)"
73endif
74ifdef SMOKE_TAGS
75 SMOKE_UPLOAD_FLAGS += -F tags="$(SMOKE_TAGS)"
76endif
b6b84d1b
ÆAB
77
78smoke_report: smoke
79 curl \
80 -H "Expect: " \
81 -F project=Git \
82 -F architecture="$(uname_M)" \
83 -F platform="$(uname_S)" \
84 -F revision="$(GIT_VERSION)" \
85 -F report_file=@test-results/git-smoke.tar.gz \
86 $(SMOKE_UPLOAD_FLAGS) \
87 http://smoke.git.nix.is/app/projects/process_add_report/1 \
88 | grep -v ^Redirecting
89
90.PHONY: pre-clean $(T) aggregate-results clean valgrind smoke smoke_report