6 DEFAULT_TEST_TARGET ?= test
8 #SVN2SVN_TEST_OPTS=--verbose --debug
9 SVN2SVN_PROVE_OPTS ?= --timer --jobs 10
12 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
14 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
16 all: $(DEFAULT_TEST_TARGET)
18 test: pre-clean $(TEST_LINT)
19 $(MAKE) aggregate-results-and-cleanup
21 prove: pre-clean _repo_ref $(TEST_LINT)
22 @echo "*** prove ***"; $(PROVE) --exec '$(SHELL_PATH_SQ)' $(SVN2SVN_PROVE_OPTS) $(T) :: $(SVN2SVN_TEST_OPTS)
26 @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(SVN2SVN_TEST_OPTS)
39 test-lint: test-lint-duplicates test-lint-executable
42 @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
43 test -z "$$dups" || { \
44 echo >&2 "duplicate test numbers:" $$dups; exit 1; }
47 @bad=`for i in $(T); do test -x "$$i" || echo $$i; done` && \
48 test -z "$$bad" || { \
49 echo >&2 "non-executable tests:" $$bad; exit 1; }
51 aggregate-results-and-cleanup: $(T)
52 $(MAKE) aggregate-results
56 for f in test-results/t*-*.counts; do \
58 done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
60 .PHONY: pre-clean $(T) aggregate-results clean