Fix the 'cover' tox env
currently tox env for code coverage does not measure anything as it tries to measure the coverage of 'ironic-staging-drivers' package, while the actual package name is 'ironic_staging_drivers'. This patch: - erases current coverage data first - fixes project name expected by 'coverage' - adds coverage reporting in the end of 'tox -ecover' run - omits tests file from both coverage and report - adds 'cover' to .gitignore (auto-generated as part of coverage report) Change-Id: I0044e3dd399934be706a06fd921972632efcceea
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,6 +24,7 @@ pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
cover
|
||||
.tox
|
||||
nosetests.xml
|
||||
.testrepository
|
||||
|
||||
5
tox.ini
5
tox.ini
@@ -26,7 +26,10 @@ commands =
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
commands =
|
||||
coverage erase
|
||||
python setup.py test --coverage --omit '*test*' --coverage-package-name ironic_staging_drivers --testr-args='{posargs}'
|
||||
coverage report --omit='*test*'
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
||||
Reference in New Issue
Block a user