Merge "integration: run gabbi first"
diff --git a/ceilometer/tests/integration/hooks/post_test_hook.sh b/ceilometer/tests/integration/hooks/post_test_hook.sh
index aec4501..3663419 100755
--- a/ceilometer/tests/integration/hooks/post_test_hook.sh
+++ b/ceilometer/tests/integration/hooks/post_test_hook.sh
@@ -95,22 +95,6 @@
 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 @@
 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