Fix tempest coverage runs
Commit 8fe6db0a changed the report generation for coverage to use
the tox coverage job. However, this job wouldn't work for the devstack-gate.
We need to pass the output directory to tempest_coverage.py so
that the coverage report gets put in the logs directory. After posargs was
added to the tox job the needed arguments can be passed to the report command.
This commit adds the needed arguments to the coverage job and reworks the if
logic to correct the behavior for the coverage flag.
Change-Id: I93bb9d91637c262e4ece6580964541c40c96eb60
This commit is contained in:
@@ -224,24 +224,19 @@ if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
|
||||
sudo -H -u stack ./tools/configure_tempest.sh
|
||||
fi
|
||||
cd $BASE/new/tempest
|
||||
if [[ "$DEVSTACK_GATE_TEMPEST_COVERAGE" -eq "1" ]] ; then
|
||||
echo "Starting coverage data collection"
|
||||
sudo -H -u stack python -m tools/tempest_coverage -c start --combine
|
||||
fi
|
||||
if [[ "$DEVSTACK_GATE_TEMPEST_ALL" -eq "1" ]]; then
|
||||
echo "Running tempest all test suite"
|
||||
sudo -H -u stack tox -eall
|
||||
elif [[ "$DEVSTACK_GATE_TEMPEST_FULL" -eq "1" ]]; then
|
||||
echo "Running tempest full test suite"
|
||||
sudo -H -u stack tox -efull
|
||||
elif [[ "$DEVSTACK_GATE_TEMPEST_COVERAGE" -eq "1" ]] ; then
|
||||
echo "Generating coverage report"
|
||||
sudo -H -u stack tox -ecoverage -- -o $BASE/new/tempest/coverage-report
|
||||
else
|
||||
echo "Running tempest smoke tests"
|
||||
sudo -H -u stack tox -esmoke
|
||||
fi
|
||||
if [[ "$DEVSTACK_GATE_TEMPEST_COVERAGE" -eq "1" ]] ; then
|
||||
echo "Generating coverage report"
|
||||
sudo -H -u stack tox -ecoverage
|
||||
fi
|
||||
else
|
||||
# Jenkins expects at least one nosetests file. If we're not running
|
||||
# tempest, then write a fake one that indicates the tests pass (since
|
||||
|
||||
Reference in New Issue
Block a user