Allow for arguments to DEVSTACK_GATE_SETTINGS.

The following patch added some arguments to be passed to the
DEVSTACK_GATE_SETTINGS file:

    https://review.openstack.org/394684

This is not currently supported by devstack-gate, as the argument is
included as part of the filename when checking to see if the settings
file exists.  This patch makes it ignore arguments when checking for
the existence of the settings file.

Closes-bug: 1665856
Change-Id: Ie787baeeafd38670e4085d734329b64eff3d3741
Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant 2017-02-18 02:28:15 -05:00
parent f5dccd60c2
commit d27ef0d5f4
1 changed files with 8 additions and 1 deletions

View File

@ -603,8 +603,15 @@ fi executable=/bin/bash"
# should be sourced after the environment has been set up. This is useful for
# allowing projects to provide a script in their repo that sets some custom
# environment variables.
check_for_devstack_gate_settings() {
if [ -f $1 ] ; then
return 0
else
return 1
fi
}
if [ -n "${DEVSTACK_GATE_SETTINGS}" ] ; then
if [ -f "${DEVSTACK_GATE_SETTINGS}" ] ; then
if check_for_devstack_gate_settings ${DEVSTACK_GATE_SETTINGS} ; then
source ${DEVSTACK_GATE_SETTINGS}
else
echo "WARNING: DEVSTACK_GATE_SETTINGS file does not exist: '${DEVSTACK_GATE_SETTINGS}'"