Respect constraints in tempest tox venvs

This commit is a workaround for respecting upper-constraints. Since
we're using tox to handle setting up a venv and running tempest
commands we need to manually install the constrained packages inside
the tox venvs. This patch does that for all the venvs being created by
devstack via tox. However, since tempest has additional tox jobs
defined if those are run via devstack those will default to the
default pip install -U -r requirements.txt defined in tempest's
tox.ini.

Change-Id: I7f84dfb67a3c97003947aefd8a7e3c6454106db4
Closes-Bug: #1543841
This commit is contained in:
Matthew Treinish 2016-02-09 23:50:54 -05:00
parent 1a9e294ff3
commit 1e31e68557
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 8 additions and 1 deletions

View File

@ -321,7 +321,10 @@ function configure_tempest {
local tmp_cfg_file
tmp_cfg_file=$(mktemp)
cd $TEMPEST_DIR
tox -revenv -- tempest verify-config -u -r -o $tmp_cfg_file
tox -revenv --notest
# NOTE(mtreinish): Respect constraints on tempest verify-config venv
tox -evenv -- pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
tox -evenv -- tempest verify-config -uro $tmp_cfg_file
local compute_api_extensions=${COMPUTE_API_EXTENSIONS:-"all"}
if [[ ! -z "$DISABLE_COMPUTE_API_EXTENSIONS" ]]; then
@ -588,6 +591,10 @@ function install_tempest {
pip_install tox
pushd $TEMPEST_DIR
tox --notest -efull
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
# are using a tox job other than full will not be respecting constraints but
# running pip install -U on tempest requirements
$TEMPEST_DIR/.tox/full/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/full
install_tempest_lib
popd