Make the measuring code coverage test working
Change-Id: Ice9a3ddbced8562ab4c71d0331ace53b83f4fc93 Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
This commit is contained in:
parent
87bc59af5b
commit
4c610b35b9
@ -1,7 +1,6 @@
|
|||||||
[run]
|
[run]
|
||||||
branch = True
|
branch = True
|
||||||
source = validations-common
|
source = validations-common
|
||||||
omit = validations-common/openstack/*
|
|
||||||
|
|
||||||
[report]
|
[report]
|
||||||
ignore_errors = True
|
ignore_errors = True
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -29,7 +29,7 @@ cover/
|
|||||||
nosetests.xml
|
nosetests.xml
|
||||||
.testrepository
|
.testrepository
|
||||||
.venv
|
.venv
|
||||||
.stestr/
|
.stestr/*
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
test_path=./validations_common/tests
|
test_path=${TEST_PATH:-./validations_common/tests}
|
||||||
top_dir=./
|
top_dir=./
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
|
- openstack-tox-cover
|
||||||
- validations-common-functional
|
- validations-common-functional
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
|
37
tox.ini
37
tox.ini
@ -3,9 +3,15 @@ minversion = 3.2.0
|
|||||||
envlist = linters,docs,py38,molecule
|
envlist = linters,docs,py38,molecule
|
||||||
skipdist = True
|
skipdist = True
|
||||||
|
|
||||||
|
# Automatic envs (pyXX) will only use the python version appropriate to that
|
||||||
|
# env and ignore basepython inherited from [testenv] if we set
|
||||||
|
# ignore_basepython_conflict.
|
||||||
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
passenv = *
|
passenv =
|
||||||
|
TERM
|
||||||
setenv =
|
setenv =
|
||||||
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/validations_common/callback_plugins
|
ANSIBLE_CALLBACK_PLUGINS={toxinidir}/validations_common/callback_plugins
|
||||||
ANSIBLE_LOOKUP_PLUGINS={toxinidir}/validations_common/lookup_plugins
|
ANSIBLE_LOOKUP_PLUGINS={toxinidir}/validations_common/lookup_plugins
|
||||||
@ -18,11 +24,13 @@ setenv =
|
|||||||
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
# pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
|
||||||
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
|
# paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
|
||||||
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
|
PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
|
||||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
PIP_+ VIRTUAL_ENV={envdir}
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
LANGUAGE=en_US:en
|
||||||
|
LC_ALL=C
|
||||||
|
HOME={envdir}DISABLE_PIP_VERSION_CHECK=1
|
||||||
commands =
|
commands =
|
||||||
stestr run {posargs}
|
stestr run --slowest --color {posargs}
|
||||||
stestr slowest
|
|
||||||
sitepackages = True
|
|
||||||
deps =
|
deps =
|
||||||
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
-c {env:TOX_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
||||||
-r {toxinidir}/requirements.txt
|
-r {toxinidir}/requirements.txt
|
||||||
@ -97,12 +105,21 @@ deps = -r{toxinidir}/doc/requirements.txt
|
|||||||
commands =
|
commands =
|
||||||
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
|
[testenv:venv]
|
||||||
|
commands = {posargs}
|
||||||
|
passenv = *
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
deps =
|
setenv =
|
||||||
-r {toxinidir}/requirements.txt
|
PYTHON=coverage run --source validations_common --parallel-mode
|
||||||
-r {toxinidir}/test-requirements.txt
|
HOME={envdir}
|
||||||
-r {toxinidir}/molecule-requirements.txt
|
commands =
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
coverage erase
|
||||||
|
stestr run --color {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user