3 # Copyright (c) 2005 Junio C Hamano
6 -include ../config.mak.autogen
9 #GIT_TEST_OPTS=--verbose --debug
10 SHELL_PATH ?= $(SHELL)
11 PERL_PATH ?= /usr/bin/perl
15 DEFAULT_TEST_TARGET ?= test
18 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
20 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
21 TSVN = $(wildcard t91[0-9][0-9]-*.sh)
22 TGITWEB = $(wildcard t95[0-9][0-9]-*.sh)
24 all: $(DEFAULT_TEST_TARGET)
27 $(MAKE) aggregate-results-and-cleanup
30 @echo "*** prove ***"; GIT_CONFIG=.git/config $(PROVE) --exec '$(SHELL_PATH_SQ)' $(GIT_PROVE_OPTS) $(T) :: $(GIT_TEST_OPTS)
34 @echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
40 $(RM) -r 'trash directory'.* test-results
44 aggregate-results-and-cleanup: $(T)
45 $(MAKE) aggregate-results
49 for f in test-results/t*-*.counts; do \
51 done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
53 # we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
55 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
56 $(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
62 GIT_TEST_OPTS=--valgrind $(MAKE)
64 # Smoke testing targets
65 -include ../GIT-VERSION-FILE
66 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo unknown')
67 uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo unknown')
72 test-results/git-smoke.tar.gz: test-results
73 $(PERL_PATH) ./harness \
74 --archive="test-results/git-smoke.tar.gz" \
77 smoke: test-results/git-smoke.tar.gz
81 SMOKE_UPLOAD_FLAGS += -F username="$(SMOKE_USERNAME)" -F password="$(SMOKE_PASSWORD)"
84 SMOKE_UPLOAD_FLAGS += -F comments="$(SMOKE_COMMENT)"
87 SMOKE_UPLOAD_FLAGS += -F tags="$(SMOKE_TAGS)"
94 -F architecture="$(uname_M)" \
95 -F platform="$(uname_S)" \
96 -F revision="$(GIT_VERSION)" \
97 -F report_file=@test-results/git-smoke.tar.gz \
98 $(SMOKE_UPLOAD_FLAGS) \
99 http://smoke.git.nix.is/app/projects/process_add_report/1 \
100 | grep -v ^Redirecting
102 .PHONY: pre-clean $(T) aggregate-results clean valgrind smoke smoke_report