From ca03ae860a796c2cb78527f8ef6673d231b90e7c Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Tue, 8 Mar 2016 11:41:39 -0600 Subject: [PATCH] Fix gate scripts to use script dir for sourcing commons The gate job calls the hook scripts directly, without changing the current directory. So we need to source the commons script from the hook script directory. Also fix typo in screen dir env var name. Change-Id: I2fb3759307035e63e6bec9c4f1cdf568e178ebb2 --- tools/gate/integration/commons | 2 +- tools/gate/integration/post_test_hook.sh | 4 +++- tools/gate/integration/pre_test_hook.sh | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/gate/integration/commons b/tools/gate/integration/commons index 1f2fe43..8e6afb4 100644 --- a/tools/gate/integration/commons +++ b/tools/gate/integration/commons @@ -2,4 +2,4 @@ set -ex -export LBAAS_DASHBOARD_SCREENSHOTS_DIR=/opt/stack/new/neutron-lbaas-dashboard/.tox/py27integration/src/horizon/openstack_dashboard/test/integration_tests/integration_tests_screenshots +export NEUTRON_LBAAS_DASHBOARD_SCREENSHOTS_DIR=/opt/stack/new/neutron-lbaas-dashboard/.tox/py27integration/src/horizon/openstack_dashboard/test/integration_tests/integration_tests_screenshots diff --git a/tools/gate/integration/post_test_hook.sh b/tools/gate/integration/post_test_hook.sh index 0f9cbf8..b9477bd 100755 --- a/tools/gate/integration/post_test_hook.sh +++ b/tools/gate/integration/post_test_hook.sh @@ -3,7 +3,9 @@ # This script will be executed inside post_test_hook function in devstack gate set -x -source commons $@ + +DIR=${BASH_SOURCE%/*} +source $DIR/commons $@ set +e cd /opt/stack/new/neutron-lbaas-dashboard diff --git a/tools/gate/integration/pre_test_hook.sh b/tools/gate/integration/pre_test_hook.sh index 4fb15a1..072847d 100755 --- a/tools/gate/integration/pre_test_hook.sh +++ b/tools/gate/integration/pre_test_hook.sh @@ -3,7 +3,9 @@ # This script will be executed inside pre_test_hook function in devstack gate set -ex -source commons $@ + +DIR=${BASH_SOURCE%/*} +source $DIR/commons $@ # Enable LBaaS V2 Neutron plugin DEVSTACK_LOCAL_CONFIG+=$'\n'"enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas"