[blivet:rhel7/master] Add a coverage test target (#1064895)
mulhern
amulhern at redhat.com
Tue Feb 18 17:37:59 UTC 2014
Resolves: rhbz#1064895
Submitted by: Alexander Todorov <atodorov at redhat.com>
Revised by: mulhern <amulhern at redhat.com>
Signed-off-by: mulhern <amulhern at redhat.com>
---
Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/Makefile b/Makefile
index 872d0c1..1079faa 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,12 @@ test:
@echo "*** Running unittests ***"
PYTHONPATH=.:tests/ python -m unittest discover -v -s tests/ -p '*_test.py'
+coverage:
+ @which coverage || (echo "*** Please install python-coverage ***"; exit 2)
+ @echo "*** Running unittests with coverage ***"
+ PYTHONPATH=.:tests/ coverage run --branch -m unittest discover -v -s tests/ -p '*_test.py'
+ coverage report --include="blivet/*"
+
clean:
-rm *.tar.gz blivet/*.pyc blivet/*/*.pyc ChangeLog
$(MAKE) -C po clean
--
1.8.3.1
More information about the anaconda-patches
mailing list