Skip to content
Snippets Groups Projects
Commit ce703aee authored by Taddeüs Kroes's avatar Taddeüs Kroes
Browse files

Added code coverage option to Makefile.

parent 9d16d57d
No related branches found
No related tags found
No related merge requests found
......@@ -3,3 +3,5 @@
*~
*.bak
data/
coverage/*
.coverage
TEST := test.py
COVERAGE_DIR := coverage
COVERAGE_OMIT=/usr/share/pyshared/*,test.py,tests/*
test:
@pyrg $(TEST)
coverage:
coverage erase
@if [ -d $(COVERAGE_DIR) ]; then rm -rf $(COVERAGE_DIR)/* \
else mkdir $(COVERAGE_DIR); fi
coverage run test.py
coverage html --omit=$(COVERAGE_OMIT) -d $(COVERAGE_DIR)
coverage report --omit=$(COVERAGE_OMIT)
clean:
rm `find -name \*.pyc`
coverage erase
rm -rf $(COVERAGE_DIR) `find -name \*.pyc`
.PHONY: test clean
.PHONY: test clean coverage
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment