From 7c5b0989474959a6f10e687871b94ae4a3f62244 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 21 Jan 2013 19:10:53 -0800 Subject: [PATCH] Use setup.py testr to run testr in run_tests.sh. Using the setup.py testr command in run_tests.sh will sync run_tests.sh up with the way tox currently runs the tests and collects coverage. Change-Id: I21e3965280b3242a860c6be49c4dca44f197b03a --- run_tests.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 8a7bce63b5db..238f5e1946a4 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -83,13 +83,17 @@ function run_tests { if [ "x$testrargs" = "x" ]; then testrargs="^(?!.*test.*coverage).*$" fi - export PYTHON="${wrapper} coverage run --source nova --parallel-mode" + TESTRTESTS="$TESTRTESTS --coverage" + else + TESTRTESTS="$TESTRTESTS --slowest" fi + # Just run the test suites in current environment set +e - TESTRTESTS="$TESTRTESTS $testrargs" + testrargs=`echo "$testrargs" | sed -e's/^\s*\(.*\)\s*$/\1/'` + TESTRTESTS="$TESTRTESTS --testr-args='$testrargs'" echo "Running \`${wrapper} $TESTRTESTS\`" - ${wrapper} $TESTRTESTS + bash -c "${wrapper} $TESTRTESTS" RESULT=$? set -e @@ -143,7 +147,7 @@ function run_pep8 { } -TESTRTESTS="testr run --parallel $testropts" +TESTRTESTS="python setup.py testr $testropts" if [ $never_venv -eq 0 ] then