e220cd2d238805ee03790a816843e7b62e018dcb
[packages/text.git] / tests / Makefile
1 count = 1000
2
3 all: coverage literal-rule-test
4
5 literal-rule-test:
6 ./literal-rule-test.sh
7
8 coverage: build coverage/hpc_index.html
9
10 build: text-test-data
11 cabal configure -fhpc
12 cabal build
13
14 text-test-data:
15 hg clone https://bitbucket.org/bos/text-test-data
16 $(MAKE) -C text-test-data
17
18 coverage/text-tests.tix:
19 -mkdir -p coverage
20 ./dist/build/text-tests/text-tests -a $(count)
21 mv text-tests.tix $@
22
23 coverage/text-tests-stdio.tix:
24 -mkdir -p coverage
25 ./scripts/cover-stdio.sh ./dist/build/text-tests-stdio/text-tests-stdio
26 mv text-tests-stdio.tix $@
27
28 coverage/coverage.tix: coverage/text-tests.tix coverage/text-tests-stdio.tix
29 hpc combine --output=$@ \
30 --exclude=Main \
31 coverage/text-tests.tix \
32 coverage/text-tests-stdio.tix
33
34 coverage/hpc_index.html: coverage/coverage.tix
35 hpc markup --destdir=coverage coverage/coverage.tix
36
37 clean:
38 rm -rf dist coverage .hpc
39
40 .PHONY: build coverage all literal-rule-test