summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2013-01-21 19:10:53 -0800
committerClark Boylan <clark.boylan@gmail.com>2013-01-21 19:10:53 -0800
commit7c5b0989474959a6f10e687871b94ae4a3f62244 (patch)
treecefe9e8badb2a9754fc7eb5bce38199589290943
parentcc88380dfe11d4a96ba3140b16e97abad7550f34 (diff)
downloadnova-7c5b0989474959a6f10e687871b94ae4a3f62244.tar.gz
nova-7c5b0989474959a6f10e687871b94ae4a3f62244.tar.xz
nova-7c5b0989474959a6f10e687871b94ae4a3f62244.zip
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
-rwxr-xr-xrun_tests.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 8a7bce63b..238f5e194 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