Fix test coverage tox command for patrole.
Currently, tox -ecover doesn't work. This patch simply uses nosetests and nosecover to generate a correct coverage report for unit tests. Change-Id: Ib7093796ead2bbef5c588c304336582f06ddd1c3
This commit is contained in:
parent
8913879798
commit
1ee5f4d912
@ -2,12 +2,14 @@
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
|
||||
# needed for doc build
|
||||
|
||||
sphinx>=1.2.1,!=1.3b1,<1.4 # BSD
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
reno>=1.8.0 # Apache-2.0
|
||||
mock>=2.0 # BSD
|
||||
coverage>=4.0 # Apache-2.0
|
||||
nose # LGPL
|
||||
nosexcover # BSD
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
oslo.policy>=1.17.0 # Apache-2.0
|
||||
oslo.log>=3.11.0 # Apache-2.0
|
||||
|
10
tox.ini
10
tox.ini
@ -28,7 +28,15 @@ commands = check-uuid --fix
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
NOSE_WITH_COVERAGE=1
|
||||
NOSE_COVER_BRANCHES=1
|
||||
NOSE_COVER_PACKAGE=patrole_tempest_plugin
|
||||
NOSE_COVER_HTML=1
|
||||
NOSE_COVER_HTML_DIR={toxinidir}/cover
|
||||
NOSE_WHERE=patrole_tempest_plugin/tests/unit
|
||||
whitelist_externals = nosetests
|
||||
commands = nosetests {posargs}
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
Loading…
Reference in New Issue
Block a user