Add branch coverage, HTML pages, verbosity

Running the unit tests outside of tox is useful since one can use the
python debugger, pdb, to step through failing tests to find out what
is wrong. Having it conveniently generate the coverage HTML reports
avoids running tox just to get that data.

We also add support for branch coverage, which will be highlighted in
the HTML reports.

Change-Id: Iccc7cd12efff8c136702638c8cb2fdca5d5d680b
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/5134
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
This commit is contained in:
Peter Portante 2013-05-31 21:26:28 -04:00 committed by Luis Pabon
parent a574805398
commit 50e1660f5b
2 changed files with 3 additions and 2 deletions

View File

@ -13,7 +13,7 @@ deps =
https://launchpad.net/swift/grizzly/1.8.0/+download/swift-1.8.0.tar.gz
-r{toxinidir}/tools/test-requires
changedir = {toxinidir}/test/unit
commands = nosetests -v --exe --with-xunit --with-coverage --cover-package gluster --cover-erase --cover-xml --cover-html {posargs}
commands = nosetests -v --exe --with-xunit --with-coverage --cover-package gluster --cover-erase --cover-xml --cover-html --cover-branches {posargs}
[tox:jenkins]
downloadcache = ~/cache/pip

View File

@ -1,7 +1,8 @@
#!/bin/bash
cd $(dirname $0)/test/unit
nosetests --exe --with-coverage --cover-package gluster --cover-erase $@
nosetests -v --exe --with-coverage --cover-package gluster --cover-erase --cover-html --cover-branches $@
saved_status=$?
rm -f .coverage
exit $saved_status