Add better coverage support under tox

For those in the community who don't use run_tests.sh but want
tox to have coverage support this small change should help. It
adds coverage erase, combine, html reporting. It also
fixes the coverage unit tests in two ways. The first is
adding the locking like normal unit tests. The second
is adding substring regular expression matching to pick
a subset of tests. This brings it up to closer par with
run_tests.sh.
Change-Id: If9ea229425dc9a191fa7c5cc073cf5da412a69b7
This commit is contained in:
Christopher Lefelhocz
2014年05月20日 14:01:53 -05:00
parent bc3387be21
commit e9b5acf5d4

View File

@@ -36,8 +36,11 @@ commands = bash tools/lintstack.sh
# tests conflict with coverage.
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage \
--testr-args='^(?!.*test.*coverage).*$'
coverage erase
python -m nova.openstack.common.lockutils python setup.py testr --coverage \
--testr-args='(?=.*{posargs})^(?!.*test.*coverage).*$'
coverage combine
coverage html --include='nova/*' --omit='nova/openstack/common/*' -d covhtml -i
[testenv:venv]
commands = {posargs}
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.