Add cover target and zuul configuration
Enable unit testing coverage reporting. Change-Id: I4d0cf0ae1716d880bfc2c73735ac2e1b6ec1c0d7
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
- project:
|
- project:
|
||||||
templates:
|
templates:
|
||||||
- openstack-python3-charm-jobs
|
- openstack-python3-charm-jobs
|
||||||
|
- openstack-cover-jobs
|
||||||
|
|||||||
25
tox.ini
25
tox.ini
@@ -31,6 +31,31 @@ basepython = python3
|
|||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands = flake8 {posargs} charms_openstack unit_tests
|
commands = flake8 {posargs} charms_openstack unit_tests
|
||||||
|
|
||||||
|
[testenv:cover]
|
||||||
|
basepython = python3
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run
|
||||||
|
commands =
|
||||||
|
coverage erase
|
||||||
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
|
[coverage:run]
|
||||||
|
branch = True
|
||||||
|
concurrency = multiprocessing
|
||||||
|
parallel = True
|
||||||
|
source =
|
||||||
|
.
|
||||||
|
omit =
|
||||||
|
.tox/*
|
||||||
|
unit_tests/*
|
||||||
|
*/templates/*
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|||||||
Reference in New Issue
Block a user