50e1660f5b
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>
37 lines
869 B
INI
37 lines
869 B
INI
[tox]
|
|
envlist = py26,py27,pep8
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
NOSE_WITH_OPENSTACK=1
|
|
NOSE_OPENSTACK_COLOR=1
|
|
NOSE_OPENSTACK_RED=0.05
|
|
NOSE_OPENSTACK_YELLOW=0.025
|
|
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
NOSE_OPENSTACK_STDOUT=1
|
|
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 --cover-branches {posargs}
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
changedir = {toxinidir}
|
|
commands =
|
|
flake8 gluster test
|
|
|
|
[testenv:cover]
|
|
setenv = NOSE_WITH_COVERAGE=1
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
ignore = H
|
|
builtins = _
|
|
exclude = .venv,.tox,dist,doc,test,*egg
|
|
show-source = True
|