From 2b580f4258bfdeef2bc8e8d3f9f6dbf7949099cf Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Fri, 1 Mar 2019 22:47:28 +0100 Subject: [PATCH] Allow users to disable the tests run by Grenade Setting RUN_HEAT_INTEGRATION_TESTS=False disables the Heat integration tests which are normally executed by Grenade after the deployment of the base environment and after the upgrade. This is useful when Heat is used in a Grenade job of another component, where the focus of the testing is not Heat itself, thus shortening the run-time of the overall Grenade job. The default behavior is unchanged. Change-Id: I47b258fecd45ebc08c82df179625bcfb57a32894 --- devstack/upgrade/resources.sh | 10 +++++++--- devstack/upgrade/settings | 3 +++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/devstack/upgrade/resources.sh b/devstack/upgrade/resources.sh index 1beb4a6e57..1b7be42eec 100755 --- a/devstack/upgrade/resources.sh +++ b/devstack/upgrade/resources.sh @@ -73,8 +73,10 @@ function _run_heat_integrationtests { } function create { - # run heat integration tests instead of tempest smoke before create - _run_heat_integrationtests $BASE_DEVSTACK_DIR + if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then + # run heat integration tests instead of tempest smoke before create + _run_heat_integrationtests $BASE_DEVSTACK_DIR + fi source $TOP_DIR/openrc admin admin # creates a tenant for the server @@ -110,7 +112,9 @@ function verify { _heat_set_user local side="$1" if [[ "$side" = "post-upgrade" ]]; then - _run_heat_integrationtests $TARGET_DEVSTACK_DIR + if [ "${RUN_HEAT_INTEGRATION_TESTS}" == "True" ]; then + _run_heat_integrationtests $TARGET_DEVSTACK_DIR + fi fi stack_name=$(resource_get heat stack_name) heat stack-show $stack_name diff --git a/devstack/upgrade/settings b/devstack/upgrade/settings index 2b774b7574..1db747a7e7 100644 --- a/devstack/upgrade/settings +++ b/devstack/upgrade/settings @@ -4,5 +4,8 @@ devstack_localrc base enable_service h-api h-api-cfn h-eng heat tempest devstack_localrc target enable_service h-api h-api-cfn h-eng heat tempest BASE_RUN_SMOKE=False TARGET_RUN_SMOKE=False +# Integration tests may be skipped when heat is not the main +# focus of the testing. +export RUN_HEAT_INTEGRATION_TESTS=$(trueorfalse True RUN_HEAT_INTEGRATION_TESTS) export HOST_TOPOLOGY=${HOST_TOPOLOGY}