Fix nova coverage.

Nova coverage was broken because additional coverage tests were added
that interfere with collecting coverage during unit testing. These new
tests were not properly excluded by the coverage unit test regex. Modify
the regex to exclude any tests of the form '.*test.*coverage.*'. This
allows `tox -ecover` and `run_tests.sh --coverage` to run properly.

Change-Id: Id35f50ec335707c9eadb0e7fb3aa0833661f7333
This commit is contained in:
Clark Boylan 2013-01-21 19:05:51 -08:00
parent a4d608fa33
commit cc88380dfe
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ function run_tests {
if [ $coverage -eq 1 ]; then
# Do not test test_coverage_ext when gathering coverage.
if [ "x$testrargs" = "x" ]; then
testrargs="^(?!.*test_coverage_ext).*$"
testrargs="^(?!.*test.*coverage).*$"
fi
export PYTHON="${wrapper} coverage run --source nova --parallel-mode"
fi

View File

@ -38,7 +38,7 @@ commands = python tools/flakes.py nova
# tests conflict with coverage.
commands =
python setup.py testr --coverage \
--testr-args='^(?!.*test_coverage_ext).*$'
--testr-args='^(?!.*test.*coverage).*$'
[testenv:venv]
commands = {posargs}