Fix running unit tests with coverage
The path to this repo is added to PYTHONPATH when the coverage flag is specified so that the cinder entry points are discovered. Change-Id: Ie33a63c6ecd443b900fa7bed3a1ec5b6bb0065e6 Closes-Bug: #1364347
This commit is contained in:
parent
c4bddaa50d
commit
373fad9dc5
@ -132,6 +132,11 @@ function run_tests {
|
|||||||
|
|
||||||
if [ $coverage -eq 1 ]; then
|
if [ $coverage -eq 1 ]; then
|
||||||
TESTRTESTS="$TESTRTESTS --coverage"
|
TESTRTESTS="$TESTRTESTS --coverage"
|
||||||
|
if [ -z "${PYTHONPATH:-}" ]; then
|
||||||
|
export PYTHONPATH=./
|
||||||
|
else
|
||||||
|
export PYTHONPATH=$PYTHONPATH:./
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
TESTRTESTS="$TESTRTESTS"
|
TESTRTESTS="$TESTRTESTS"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user