From 19a395f2354e5b5a0808abca460ce95b5fd5c0b0 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 11 Jan 2013 15:45:58 -0500 Subject: [PATCH] Fix import failures on coverage runs. The tempest_coverage.py script can't import from tempest because it is located in the tools directory. This change runs python with '-m' to add the tempest directory to PYTHONPATH. Change-Id: I709474b97f2bf6d161bc063751874ca8054aa2ed --- devstack-vm-gate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 70a64d41..121f7d1c 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -170,7 +170,7 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then cd $BASE/new/tempest if [[ "$DEVSTACK_GATE_TEMPEST_COVERAGE" -eq "1" ]] ; then echo "Starting coverage data collection" - sudo -H -u stack python tools/tempest_coverage.py -c start --combine + sudo -H -u stack python -m tools/tempest_coverage -c start --combine fi echo "Running tempest smoke tests" sudo -H -u stack NOSE_XUNIT_FILE=nosetests-smoke.xml nosetests --with-xunit -sv --attr=type=smoke tempest @@ -181,7 +181,7 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then fi if [[ "$DEVSTACK_GATE_TEMPEST_COVERAGE" -eq "1" ]] ; then echo "Generating coverage report" - sudo -H -u stack python tools/tempest_coverage.py -c report --html -o $COVERAGE_OUT + sudo -H -u stack python -m tools/tempest_coverage -c report --html -o $COVERAGE_OUT fi else # Jenkins expects at least one nosetests file. If we're not running