From cc88380dfe11d4a96ba3140b16e97abad7550f34 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 21 Jan 2013 19:05:51 -0800 Subject: [PATCH] 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 --- run_tests.sh | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 39176d78bff5..8a7bce63b5db 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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 diff --git a/tox.ini b/tox.ini index 58468accb821..e98f301515b8 100644 --- a/tox.ini +++ b/tox.ini @@ -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}