|
|
@@ -1,20 +1,19 @@
|
|
|
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: covclean
|
|
|
coverage run test.py
|
|
|
- coverage html --omit=$(COVERAGE_OMIT) -d $(COVERAGE_DIR)
|
|
|
- coverage report --omit=$(COVERAGE_OMIT)
|
|
|
+ coverage report
|
|
|
+ coverage html
|
|
|
|
|
|
-clean:
|
|
|
+covclean:
|
|
|
coverage erase
|
|
|
- rm -rf $(COVERAGE_DIR) `find -name \*.pyc`
|
|
|
+ rm -rf $(COVERAGE_DIR)
|
|
|
+
|
|
|
+clean: covclean
|
|
|
+ rm `find -name \*.pyc`
|
|
|
|
|
|
-.PHONY: test clean coverage
|
|
|
+.PHONY: test clean coverage covclean
|