barbican/functionaltests/post_test_hook.sh
Dave McCowan 1ffb958c5d 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
2017-04-04 13:36:42 -04:00

33 lines
977 B
Bash
Executable File

#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# This script is executed inside post_test_hook function in devstack gate.
# Install packages from test-requirements.txt
set -ex
plugin=$1
sudo pip install -r /opt/stack/new/barbican/test-requirements.txt
cd /opt/stack/new/barbican/functionaltests
echo 'Running Functional Tests'
if [ "$DEVSTACK_GATE_USE_PYTHON3" = True ]; then
export PYTHON=$(which python3 2>/dev/null)
fi
sudo -E ./run_tests.sh $plugin