Use run-tests.sh for tox coverage tests
The coverage tests mustn't run in parallel and must have a working mongod instance like other tests. So just use the run-tests.sh with a special flags --coverage Fix bug #1199411 Change-Id: Id750697a69213ee753280b7adc8f726dbdb1fca5
This commit is contained in:
parent
048c59c930
commit
b3ebef4e92
15
run-tests.sh
15
run-tests.sh
@ -1,9 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Nova notifier tests
|
||||
bash tools/init_testr_if_needed.sh
|
||||
python setup.py testr --slowest --testr-args="--concurrency=1 --here=nova_tests $*"
|
||||
if [ "$1" = "--coverage" ]; then
|
||||
COVERAGE_ARG="$1"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ ! "$COVERAGE_ARGS" ]; then
|
||||
# Nova notifier tests
|
||||
bash tools/init_testr_if_needed.sh
|
||||
python setup.py testr --slowest --testr-args="--concurrency=1 --here=nova_tests $*"
|
||||
fi
|
||||
|
||||
# Main unit tests
|
||||
MONGO_DATA=`mktemp -d`
|
||||
@ -12,4 +19,4 @@ mongod --maxConns 32 --smallfiles --quiet --noauth --port 29000 --dbpath "${MONG
|
||||
MONGO_PID=$!
|
||||
trap "kill -9 ${MONGO_PID} || true" EXIT
|
||||
export CEILOMETER_TEST_MONGODB_URL="mongodb://localhost:29000/ceilometer"
|
||||
python setup.py testr --slowest --testr-args="--concurrency=1 $*"
|
||||
python setup.py testr --slowest --testr-args="--concurrency=1 $*" $COVERAGE_ARG
|
||||
|
Loading…
x
Reference in New Issue
Block a user