Fix zuul_cloner errors during tox job setup

Since [1], Tempest is a pip installable package, and that prevents zuul_cloner
to work correctly. This change moves away from the existing logic in tox_install,
and adds tempest as an explicit requirement for the api job. This is in fact
the only tox target that needs Tempest to work.

tox_install.sh has become less important now, but cleanup is left as follow
up, to speed up gate salvation.

[1] I25eac915c977ebaedced66ac896c5dd77259d193

Change-Id: I00d882dde77a687ecb57ec200a34fd96256ad87a
(cherry picked from commit 8a6913c534)
This commit is contained in:
Armando Migliaccio 2016-04-01 13:38:06 -07:00
parent 33c01f4d49
commit 3190494c0d
3 changed files with 11 additions and 19 deletions

View File

@ -0,0 +1,7 @@
# Additional requirements for api tests
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
tempest>=10.0.0 # Apache-2.0

View File

@ -9,10 +9,7 @@
# from neutron master via a hard-coded URL. That last case should only
# happen with devs running unit tests locally.
ZUUL_CLONER=/usr/zuul-env/bin/zuul-cloner
tempest_installed=$(python -c "import tempest" 2>/dev/null ; echo $?)
set -e
set -eux
install_cmd="pip install"
@ -23,19 +20,4 @@ if [ "$CONSTRAINTS_FILE" != "unconstrained" ]; then
install_cmd="$install_cmd -c$CONSTRAINTS_FILE"
fi
if [ $tempest_installed -eq 0 ]; then
echo "Tempest already installed; using existing package"
elif [ -x "$ZUUL_CLONER" ]; then
export ZUUL_BRANCH=${ZUUL_BRANCH-$BRANCH}
pushd /tmp
$ZUUL_CLONER --cache-dir \
/opt/git \
git://git.openstack.org \
openstack/tempest
$install_cmd -e openstack/tempest
popd
else
$install_cmd -U -egit+https://git.openstack.org/openstack/tempest#egg=tempest
fi
$install_cmd -U $*

View File

@ -24,6 +24,9 @@ setenv = {[testenv]setenv}
OS_TEST_PATH=./neutron/tests/api
TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
OS_TEST_API_WITH_REST=1
deps =
{[testenv]deps}
-r{toxinidir}/neutron/tests/api/requirements.txt
[testenv:common]
# Fake job to define environment variables shared between dsvm/non-dsvm jobs