From eeaba95fea67012477b8c6f6e5f03b87bdb5828f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 19 Jun 2013 14:25:17 -0400 Subject: [PATCH] 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 --- devstack-vm-gate.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 40238d4a..b2044457 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -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