]> Tony Duckles's Git Repositories (git.nynim.org) - svn2svn.git/blob - tests/Makefile
Include --verify-all test-cases
[svn2svn.git] / tests / Makefile
1 # Run tests
2
3 #SVN2SVN_TEST_OPTS=--verbose --debug
4 SHELL_PATH ?= $(SHELL)
5 RM ?= rm -f
6 DEFAULT_TEST_TARGET ?= test
7
8 # Shell quote;
9 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
10
11 T = $(sort $(wildcard t[0-9][0-9][0-9][0-9]-*.sh))
12
13 all: $(DEFAULT_TEST_TARGET)
14
15 test: pre-clean $(TEST_LINT)
16 $(MAKE) aggregate-results-and-cleanup
17
18 $(T): _repo_ref
19 @echo "*** $@ ***"; '$(SHELL_PATH_SQ)' $@ $(SVN2SVN_TEST_OPTS)
20
21 _repo_ref:
22 ./make-ref-repo.sh
23
24 pre-clean:
25 $(RM) -r test-results
26
27 clean:
28 $(RM) -r test-results
29 $(RM) -r _wc_*
30
31 test-lint: test-lint-duplicates test-lint-executable
32
33 test-lint-duplicates:
34 @dups=`echo $(T) | tr ' ' '\n' | sed 's/-.*//' | sort | uniq -d` && \
35 test -z "$$dups" || { \
36 echo >&2 "duplicate test numbers:" $$dups; exit 1; }
37
38 test-lint-executable:
39 @bad=`for i in $(T); do test -x "$$i" || echo $$i; done` && \
40 test -z "$$bad" || { \
41 echo >&2 "non-executable tests:" $$bad; exit 1; }
42
43 aggregate-results-and-cleanup: $(T)
44 $(MAKE) aggregate-results
45 $(MAKE) clean
46
47 aggregate-results:
48 for f in test-results/t*-*.counts; do \
49 echo "$$f"; \
50 done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
51
52 .PHONY: pre-clean $(T) aggregate-results clean