Get code coverage when running test cases.
Change-Id: Ieae7e463ca766541fa0d085d04a6963e251a554f
This commit is contained in:
parent
e3ede09cad
commit
b5a02e0a29
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,6 +5,7 @@
|
||||
|
||||
# Hidden files
|
||||
.eggs
|
||||
.coverage*
|
||||
.stestr
|
||||
.test
|
||||
.testrepository
|
||||
@ -15,6 +16,7 @@ __pycache__
|
||||
AUTHORS
|
||||
build/*
|
||||
ChangeLog
|
||||
cover/
|
||||
doc/build/*
|
||||
dist/
|
||||
etc/
|
||||
|
@ -1,4 +1,5 @@
|
||||
mock >= 2.0 # BSD
|
||||
testscenarios>=0.4
|
||||
testtools>=2.2.0
|
||||
tempest>=17.1.0
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
|
14
tox.ini
14
tox.ini
@ -11,13 +11,23 @@ install_command =
|
||||
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
PYTHONWARNINGS=default::DeprecationWarning,{env:PYTHONWARNINGS:}
|
||||
PYTHONWARNINGS=ignore::Warning,{env:PYTHONWARNINGS:}
|
||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
PYTHON=coverage run --source tobiko --parallel-mode
|
||||
|
||||
whitelist_externals=
|
||||
find
|
||||
|
||||
commands =
|
||||
stestr run {posargs}
|
||||
coverage erase
|
||||
find . -type f -name "*.pyc" -delete
|
||||
stestr --test-path ./tobiko/tests run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user