From 1ffb958c5d560f442b796a71bac5cf871ca9d05e Mon Sep 17 00:00:00 2001 From: Dave McCowan Date: Tue, 28 Mar 2017 11:15:52 -0400 Subject: [PATCH] Updates to Devstack Variables The environment variable DEVSTACK_LOCAL_CONFIG can be set by the gate directly or through the gate_hook.sh script. This patch changes gate_hook.sh to append to that variable, instead of settting that variable, so not to overwrite any changes made by the gate startup scripts. Also, set the PYTHON environment variable to indicate python3 is used if indicated by the DEVSTACK_GATE variable. Change-Id: I28f2fc0bc0a97bf52fa2ba4851a90e87ef22e992 --- devstack/gate_hook.sh | 4 +++- functionaltests/post_test_hook.sh | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/devstack/gate_hook.sh b/devstack/gate_hook.sh index 99e9b52f1..6b98f73a0 100755 --- a/devstack/gate_hook.sh +++ b/devstack/gate_hook.sh @@ -15,6 +15,8 @@ set -ex # Install barbican devstack integration -export DEVSTACK_LOCAL_CONFIG="enable_plugin barbican https://git.openstack.org/openstack/barbican" +if [ -z "$DEVSTACK_LOCAL_CONFIG" ]; then + export DEVSTACK_LOCAL_CONFIG="enable_plugin barbican https://git.openstack.org/openstack/barbican" +fi $BASE/new/devstack-gate/devstack-vm-gate.sh diff --git a/functionaltests/post_test_hook.sh b/functionaltests/post_test_hook.sh index 4d2cad1c4..aea8a5da8 100755 --- a/functionaltests/post_test_hook.sh +++ b/functionaltests/post_test_hook.sh @@ -24,4 +24,9 @@ sudo pip install -r /opt/stack/new/barbican/test-requirements.txt cd /opt/stack/new/barbican/functionaltests echo 'Running Functional Tests' -sudo ./run_tests.sh $plugin + +if [ "$DEVSTACK_GATE_USE_PYTHON3" = True ]; then + export PYTHON=$(which python3 2>/dev/null) +fi + +sudo -E ./run_tests.sh $plugin