Use upper-constraints in tox runs

The upper-constraints file wasn't being enforced
when installing dependencies in tox runs which can
lead to failures like installing Sphinx>2.0 in py27
where it's not supported.

This is loosely based on novaclient change
I8be883215f27abb58d15b85e8542cbdf32000bac for the
same kind of issue.

Note there are other things that should be done
in here regarding requirements cleanup, like the
sphinx dependnecies should move to a
doc/requirements.txt file to separate them from
unit test runs, but that can be dealt with in a
follow up change.

Change-Id: I359a35af5b653299110a8d0faddb255da0b10118
Closes-Bug: #1828698
This commit is contained in:
Matt Riedemann 2019-05-11 18:45:44 -04:00
parent bb5586b477
commit 2cab116e30
1 changed files with 7 additions and 4 deletions

11
tox.ini
View File

@ -5,12 +5,15 @@ skipsdist = True
[testenv]
usedevelop = True
install_command =
constraints: pip install -U --force-reinstall -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages}
pip install -U {opts} {packages}
passenv = ZUUL_CACHE_DIR
REQUIREMENTS_PIP_LOCATION
install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = rm -f .testrepository/times.dbm
stestr --test-path=./watcherclient/tests/unit run {posargs}
stestr slowest