From 31cad7b92f3b08112d4ab9dfc2a7e5213ec8e50e Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Fri, 16 Dec 2016 10:36:47 +0100 Subject: [PATCH] integration: run gabbi first Tempest cleanup all created resources and when we generate the report manything are empty. gabbi failure is more helpful, it fails on first error and then we drop a report of all resources state just after the failure. Change-Id: If4971aa627c7cdaa01a7b18d5fe2f3545da7388a --- .../tests/integration/hooks/post_test_hook.sh | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/ceilometer/tests/integration/hooks/post_test_hook.sh b/ceilometer/tests/integration/hooks/post_test_hook.sh index aec4501a0f..3663419042 100755 --- a/ceilometer/tests/integration/hooks/post_test_hook.sh +++ b/ceilometer/tests/integration/hooks/post_test_hook.sh @@ -95,22 +95,6 @@ export NOVA_SERVICE_URL=$(openstack catalog show compute -c endpoints -f value | export GLANCE_IMAGE_NAME=$(openstack image list | awk '/ cirros.*uec /{print $4}') export ADMIN_TOKEN=$(openstack token issue -c id -f value) -if [ -d $BASE/new/devstack ]; then - # NOTE(sileht): on swift job permissions are wrong, I don't known why - sudo chown -R tempest:stack $BASE/new/tempest - sudo chown -R tempest:stack $BASE/data/tempest - - # Run tests with tempest - cd $BASE/new/tempest - set +e - sudo -H -u tempest OS_TEST_TIMEOUT=$TEMPEST_OS_TEST_TIMEOUT tox -eall-plugin -- ceilometer.tests.tempest.scenario.test_autoscaling --concurrency=$TEMPEST_CONCURRENCY - TEMPEST_EXIT_CODE=$? - set -e - export_subunit_data "all-plugin" - generate_reports_and_maybe_exit $TEMPEST_EXIT_CODE - cd $CEILOMETER_DIR -fi - # Run tests with gabbi echo "Running telemetry integration test suite" set +e @@ -120,6 +104,17 @@ EXIT_CODE=$? if [ -d $BASE/new/devstack ]; then export_subunit_data "integration" generate_reports_and_maybe_exit $EXIT_CODE + + # NOTE(sileht): on swift job permissions are wrong, I don't known why + sudo chown -R tempest:stack $BASE/new/tempest + sudo chown -R tempest:stack $BASE/data/tempest + + # Run tests with tempest + cd $BASE/new/tempest + sudo -H -u tempest OS_TEST_TIMEOUT=$TEMPEST_OS_TEST_TIMEOUT tox -eall-plugin -- ceilometer.tests.tempest.scenario.test_autoscaling --concurrency=$TEMPEST_CONCURRENCY + EXIT_CODE=$? + export_subunit_data "all-plugin" + generate_reports_and_maybe_exit $EXIT_CODE fi exit $EXIT_CODE