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
This commit is contained in:
parent
cc88380dfe
commit
7c5b098947
12
run_tests.sh
12
run_tests.sh
@ -83,13 +83,17 @@ function run_tests {
|
|||||||
if [ "x$testrargs" = "x" ]; then
|
if [ "x$testrargs" = "x" ]; then
|
||||||
testrargs="^(?!.*test.*coverage).*$"
|
testrargs="^(?!.*test.*coverage).*$"
|
||||||
fi
|
fi
|
||||||
export PYTHON="${wrapper} coverage run --source nova --parallel-mode"
|
TESTRTESTS="$TESTRTESTS --coverage"
|
||||||
|
else
|
||||||
|
TESTRTESTS="$TESTRTESTS --slowest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Just run the test suites in current environment
|
# Just run the test suites in current environment
|
||||||
set +e
|
set +e
|
||||||
TESTRTESTS="$TESTRTESTS $testrargs"
|
testrargs=`echo "$testrargs" | sed -e's/^\s*\(.*\)\s*$/\1/'`
|
||||||
|
TESTRTESTS="$TESTRTESTS --testr-args='$testrargs'"
|
||||||
echo "Running \`${wrapper} $TESTRTESTS\`"
|
echo "Running \`${wrapper} $TESTRTESTS\`"
|
||||||
${wrapper} $TESTRTESTS
|
bash -c "${wrapper} $TESTRTESTS"
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
set -e
|
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 ]
|
if [ $never_venv -eq 0 ]
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user