summaryrefslogtreecommitdiffstats
path: root/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 6c04abb5a..11bc8b518 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -81,15 +81,19 @@ 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"
+ 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
@@ -121,7 +125,7 @@ function run_pep8 {
# NOTE(lzyeval): Avoid selecting *.pyc files to reduce pep8 check-up time
# when running on devstack.
srcfiles=`find nova -type f -name "*.py" ! -wholename "nova\/openstack*"`
- srcfiles+=" `find bin -type f ! -name "nova.conf*" ! -name "*api-paste.ini*"`"
+ srcfiles+=" `find bin -type f ! -name "nova.conf*" ! -name "*api-paste.ini*" ! -name "*~"`"
srcfiles+=" `find tools -type f -name "*.py"`"
srcfiles+=" `find plugins -type f -name "*.py"`"
srcfiles+=" `find smoketests -type f -name "*.py"`"
@@ -150,7 +154,7 @@ function run_pep8 {
}
-TESTRTESTS="testr run --parallel $testropts"
+TESTRTESTS="python setup.py testr $testropts"
if [ $never_venv -eq 0 ]
then