Use upper-constraints in tox test environments
This will force pip install to use the upper-constraints.txt specified version of pip modules. When you don't do this, you are out on the bleeding edge and become unstable everytime some python library in the wide world changes in a way that you don't expect. The releasenotes job has no constraints file, so override the install command there. This commit is being proposed on stable/mitaka and therefore the install command includes the clear designation of the branch. This is because, on branches other than master, we need to be sure to get the upper-constraints.txt file for that branch. Change-Id: I5c2d878c79dcf1ce1715218950c07a39314b16ff Partial-bug: #1598906
This commit is contained in:
parent
3f7c4fc672
commit
f404fb191a
14
tox.ini
14
tox.ini
|
@ -7,7 +7,7 @@ skipsdist = True
|
|||
setenv = VIRTUAL_ENV={envdir}
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
usedevelop = True
|
||||
install_command = pip install {opts} {packages}
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/mitaka} {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
|
@ -20,9 +20,17 @@ commands =
|
|||
flake8 {posargs}
|
||||
|
||||
[testenv:venv]
|
||||
# NOTE(from nova tox.ini by jaegerandi): This target does not use constraints
|
||||
# because upstream infra does not yet support it. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command = pip install -U --force-reinstall {opts} {packages}
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
# NOTE(from nova tox.ini by jaegerandi): This target does not use constraints
|
||||
# because upstream infra does not yet support it. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command = pip install -U --force-reinstall {opts} {packages}
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
|
@ -36,6 +44,10 @@ commands = flake8
|
|||
commands = oslo-config-generator --config-file etc/oslo-config-generator/muranoagent.conf
|
||||
|
||||
[testenv:releasenotes]
|
||||
# NOTE(from nova tox.ini by jaegerandi): This target does not use constraints
|
||||
# because upstream infra does not yet support it. Once that's fixed, we can
|
||||
# drop the install_command.
|
||||
install_command = pip install -U --force-reinstall {opts} {packages}
|
||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||
|
||||
[flake8]
|
||||
|
|
Loading…
Reference in New Issue