Merge "Added tox environment for gathering coverage"
This commit is contained in:
commit
32fbcca10f
|
@ -1,7 +0,0 @@
|
|||
[report]
|
||||
# Regexes for lines to exclude from consideration
|
||||
exclude_lines =
|
||||
if __name__ == .__main__.:
|
||||
include=
|
||||
hooks/keystone_*
|
||||
actions/actions.py
|
|
@ -1,3 +1,4 @@
|
|||
- project:
|
||||
templates:
|
||||
- python35-charm-jobs
|
||||
- openstack-cover-jobs
|
||||
|
|
|
@ -5,3 +5,4 @@ flake8>=2.2.4,<=2.4.1
|
|||
os-testr>=0.4.1
|
||||
python-keystoneclient>=1.7.1
|
||||
git+https://github.com/openstack-charmers/zaza.git#egg=zaza;python_version>='3.0'
|
||||
coverage>=4.5.2
|
||||
|
|
27
tox.ini
27
tox.ini
|
@ -41,6 +41,33 @@ deps = -r{toxinidir}/requirements.txt
|
|||
commands = flake8 {posargs} hooks unit_tests tests actions lib
|
||||
charm-proof
|
||||
|
||||
[testenv:cover]
|
||||
# Technique based heavily upon
|
||||
# https://github.com/openstack/nova/blob/master/tox.ini
|
||||
basepython = python3
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run
|
||||
commands =
|
||||
coverage erase
|
||||
ostestr {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/*
|
||||
charmhelpers/*
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
commands = {posargs}
|
||||
|
|
Loading…
Reference in New Issue