text / tests / Makefile

count = 1000

coverage: build coverage/hpc_index.html

build: text-test-data
	cabal configure -fhpc
	cabal build

text-test-data:
	hg clone https://bitbucket.org/bos/text-test-data
	$(MAKE) -C text-test-data

coverage/text-tests.tix:
	-mkdir -p coverage
	./dist/build/text-tests/text-tests -a $(count)
	mv text-tests.tix $@

coverage/text-tests-stdio.tix:
	-mkdir -p coverage
	./scripts/cover-stdio.sh ./dist/build/text-tests-stdio/text-tests-stdio
	mv text-tests-stdio.tix $@

coverage/coverage.tix: coverage/text-tests.tix coverage/text-tests-stdio.tix
	hpc combine --output=$@ \
        --exclude=Main \
        coverage/text-tests.tix \
        coverage/text-tests-stdio.tix

coverage/hpc_index.html: coverage/coverage.tix
	hpc markup --destdir=coverage coverage/coverage.tix

clean:
	rm -rf dist coverage .hpc

.PHONY: build coverage
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.