Set TOX_CONSTRAINTS_FILE

UPPER_CONSTRAINTS_FILE is deprecatedi[1], set the newer
TOX_CONSTRAINTS_FILE as well when interacting with other repos for the
transition.

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ib02819e805d216ead178300df0b250f85f9f27b7
This commit is contained in:
Andreas Jaeger 2020-04-21 21:51:52 +02:00
parent 184a23bb30
commit c9a0437ea6
1 changed files with 7 additions and 5 deletions

View File

@ -860,20 +860,22 @@ if [[ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]]; then
set -o errexit
# NOTE(gmann): Use branch constraint because Tempest is pinned to the branch release
# instead of using master. We need to export it via env var UPPER_CONSTRAINTS_FILE
# instead of using master. We need to export it via env var TOX_CONSTRAINTS_FILE
# so that initial creation of tempest tox use stable branch constraint
# instead of master constraint as defined in tempest/tox.ini
stable_for_u_c="stable/[o-r]"
if [[ "$ZUUL_BRANCH" =~ $stable_for_u_c ]] ; then
export UPPER_CONSTRAINTS_FILE=$BASE/new/requirements/upper-constraints.txt
export TOX_CONSTRAINTS_FILE=$BASE/new/requirements/upper-constraints.txt
else
export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master
export TOX_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master
fi
# Older name, keep this for transition
export UPPER_CONSTRAINTS_FILE=$TOX_CONSTRAINTS_FILE
if [[ "${TEMPEST_OS_TEST_TIMEOUT:-}" != "" ]] ; then
TEMPEST_COMMAND="sudo -H -u tempest UPPER_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE OS_TEST_TIMEOUT=$TEMPEST_OS_TEST_TIMEOUT tox"
TEMPEST_COMMAND="sudo -H -u tempest UPPER_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE TOX_CONSTRAINTS_FILE=$TOX_CONSTRAINTS_FILE OS_TEST_TIMEOUT=$TEMPEST_OS_TEST_TIMEOUT tox"
else
TEMPEST_COMMAND="sudo -H -u tempest UPPER_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE tox"
TEMPEST_COMMAND="sudo -H -u tempest UPPER_CONSTRAINTS_FILE=$UPPER_CONSTRAINTS_FILE TOX_CONSTRAINTS_FILE=$TOX_CONSTRAINTS_FILE tox"
fi
cd $BASE/new/tempest