From 0323a744e6fcb2890afb2350b210e34753615d61 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 18 Dec 2012 11:33:01 -0500 Subject: 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 --- run_tests.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 014837e32..a3ed97803 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -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 -- cgit