2005-05-14 13:50:32 +08:00
|
|
|
# Run tests
|
|
|
|
#
|
|
|
|
# Copyright (c) 2005 Junio C Hamano
|
|
|
|
#
|
2005-05-14 23:58:22 +08:00
|
|
|
|
2010-05-14 17:31:38 +08:00
|
|
|
-include ../config.mak.autogen
|
2009-08-09 16:50:37 +08:00
|
|
|
-include ../config.mak
|
|
|
|
|
2005-05-14 23:58:22 +08:00
|
|
|
#GIT_TEST_OPTS=--verbose --debug
|
2005-09-25 03:50:29 +08:00
|
|
|
SHELL_PATH ?= $(SHELL)
|
2005-10-01 04:31:16 +08:00
|
|
|
TAR ?= $(TAR)
|
2007-07-15 01:51:44 +08:00
|
|
|
RM ?= rm -f
|
2005-05-14 13:50:32 +08:00
|
|
|
|
2005-10-11 04:50:01 +08:00
|
|
|
# Shell quote;
|
2006-02-18 19:40:22 +08:00
|
|
|
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
|
2005-10-11 04:50:01 +08:00
|
|
|
|
2005-05-14 13:50:32 +08:00
|
|
|
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
|
2006-07-06 15:14:16 +08:00
|
|
|
TSVN = $(wildcard t91[0-9][0-9]-*.sh)
|
2005-05-14 13:50:32 +08:00
|
|
|
|
tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent. This is not true, of course, since aggregate-results
needs the results _before_ they are removed.
Likewise, the tests should have been run already when the results are
to be aggregated.
However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:59:18 +08:00
|
|
|
all: pre-clean
|
|
|
|
$(MAKE) aggregate-results-and-cleanup
|
2005-11-08 17:51:10 +08:00
|
|
|
|
|
|
|
$(T):
|
2006-06-20 06:51:58 +08:00
|
|
|
@echo "*** $@ ***"; GIT_CONFIG=.git/config '$(SHELL_PATH_SQ)' $@ $(GIT_TEST_OPTS)
|
2005-05-14 13:50:32 +08:00
|
|
|
|
2008-06-08 22:04:35 +08:00
|
|
|
pre-clean:
|
|
|
|
$(RM) -r test-results
|
|
|
|
|
2005-05-14 23:57:32 +08:00
|
|
|
clean:
|
2009-03-28 09:57:18 +08:00
|
|
|
$(RM) -r 'trash directory'.* test-results
|
2010-03-14 04:41:20 +08:00
|
|
|
$(RM) t????/cvsroot/CVSROOT/?*
|
|
|
|
$(RM) -r valgrind/bin
|
2005-11-08 17:51:10 +08:00
|
|
|
|
tests: Clarify dependencies between tests, 'aggregate-results' and 'clean'
The Makefile targets 'aggregate-results' and 'clean' pretended to be
independent. This is not true, of course, since aggregate-results
needs the results _before_ they are removed.
Likewise, the tests should have been run already when the results are
to be aggregated.
However, as it is legitimate to run only a few tests, and then aggregate
just those results, so another target is introduced, that depends on all
tests, then aggregates the results, and only then removes the results.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-08 13:59:18 +08:00
|
|
|
aggregate-results-and-cleanup: $(T)
|
|
|
|
$(MAKE) aggregate-results
|
|
|
|
$(MAKE) clean
|
|
|
|
|
2008-06-08 22:04:35 +08:00
|
|
|
aggregate-results:
|
2010-07-16 17:37:44 +08:00
|
|
|
for f in test-results/t*-*.counts; do \
|
2010-06-02 08:13:44 +08:00
|
|
|
echo "$$f"; \
|
|
|
|
done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
|
2008-06-08 22:04:35 +08:00
|
|
|
|
2006-07-06 15:14:16 +08:00
|
|
|
# we can test NO_OPTIMIZE_COMMITS independently of LC_ALL
|
|
|
|
full-svn-test:
|
2006-12-28 17:16:19 +08:00
|
|
|
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=1 LC_ALL=C
|
2006-12-16 15:58:07 +08:00
|
|
|
$(MAKE) $(TSVN) GIT_SVN_NO_OPTIMIZE_COMMITS=0 LC_ALL=en_US.UTF-8
|
2006-07-06 15:14:16 +08:00
|
|
|
|
2009-02-04 07:26:18 +08:00
|
|
|
valgrind:
|
2009-02-04 07:26:26 +08:00
|
|
|
GIT_TEST_OPTS=--valgrind $(MAKE)
|
2009-02-04 07:26:18 +08:00
|
|
|
|
|
|
|
.PHONY: pre-clean $(T) aggregate-results clean valgrind
|