Commit ce703aee authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added code coverage option to Makefile.

parent 9d16d57d
...@@ -3,3 +3,5 @@ ...@@ -3,3 +3,5 @@
*~ *~
*.bak *.bak
data/ data/
coverage/*
.coverage
TEST := test.py TEST := test.py
COVERAGE_DIR := coverage
COVERAGE_OMIT=/usr/share/pyshared/*,test.py,tests/*
test: test:
@pyrg $(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: clean:
rm `find -name \*.pyc` coverage erase
rm -rf $(COVERAGE_DIR) `find -name \*.pyc`
.PHONY: test clean .PHONY: test clean coverage
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment