allow for the ability to run partial coverage

the way the coverage exclusion was made previously meant that
if you ran coverage, it would always run all the tests. Fix
this so you can run a subset.

Change-Id: I057587204728d379e2a43b5c5ee14fe91f83f64b
This commit is contained in:
Sean Dague 2012-12-18 11:33:01 -05:00
parent 95a1280875
commit 0323a744e6
1 changed files with 5 additions and 2 deletions

View File

@ -82,11 +82,14 @@ function run_tests {
if [ $coverage -eq 1 ]; then
# Do not test test_coverage_ext when gathering coverage.
TESTRTESTS="$TESTRTESTS ^(?!.*test_coverage_ext).*$"
if [ "x$testrargs" = "x" ]; then
testrargs = "^(?!.*test_coverage_ext).*$"
fi
export PYTHON="${wrapper} coverage run --source nova --parallel-mode"
fi
# Just run the test suites in current environment
set +e
TESTRTESTS="$TESTRTESTS $testrargs"
echo "Running \`${wrapper} $TESTRTESTS\`"
${wrapper} $TESTRTESTS
RESULT=$?
@ -130,7 +133,7 @@ function run_pep8 {
}
TESTRTESTS="testr run --parallel $testropts $testrargs"
TESTRTESTS="testr run --parallel $testropts"
if [ $never_venv -eq 0 ]
then