Add helper script to install branch tips

shade has a functional test that intends to test shade against the
current tip of client libs. Unfortunately, what it's really doing is
installing latest release of the library into the shade virtualenv
that's used for functional testing and using tip of library for the
OpenStack install.

This is not a combo we care about.

Instead, install the library tips into the virtualenv. To do this, make
a functional-tips venv for tox, and make the post_test_hook optionally
use it.

Change-Id: Ibac2982e88439362c7af933c3a07c4d581ee6f2b
This commit is contained in:
Monty Taylor 2017-01-18 16:39:28 -06:00
parent 3b4bbc43c7
commit cf2d350027
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 49 additions and 1 deletions

34
extras/install-tips.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# Copyright (c) 2017 Red Hat, Inc.
#
# 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.
for lib in \
os-client-config \
keystoneauth \
python-novaclient \
python-keystoneclient \
python-cinderclient \
python-neutronclient \
python-troveclient \
python-ironicclient \
python-heatclient \
python-designateclient \
python-magnumclient
do
egg=$(echo $lib | tr '-' '_' | sed 's/python-//')
if [ -d /opt/stack/new/$lib ] ; then
pip install -q -U -e "git+file:///opt/stack/new/$lib#egg=$egg"
fi
done

View File

@ -36,9 +36,14 @@ then
sudo sed -ie '/^.*domain_id.*$/d' $CLOUDS_YAML
fi
if [ "x$1" = "xtips" ] ; then
tox_env=functional-tips
else
tox_env=functional
fi
echo "Running shade functional test suite"
set +e
sudo -E -H -u jenkins tox -efunctional
sudo -E -H -u jenkins tox -e$tox_env
EXIT_CODE=$?
sudo testr last --subunit > $WORKSPACE/tempest.subunit
set -e

View File

@ -35,6 +35,15 @@ setenv =
passenv = OS_* SHADE_*
commands = python setup.py testr --slowest --testr-args='--concurrency=1 {posargs}'
[testenv:functional-tips]
setenv =
OS_TEST_PATH = ./shade/tests/functional
passenv = OS_* SHADE_*
whitelist_externals = bash
commands =
bash extras/install-tips.sh
python setup.py testr --slowest --testr-args='--concurrency=1 {posargs}'
[testenv:pep8]
commands = flake8 shade