From 317e9bfe5e50b26189f0e098658dc41d689204bd Mon Sep 17 00:00:00 2001 From: zhurong Date: Wed, 6 Jul 2016 09:49:39 -0400 Subject: [PATCH] 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. Change-Id: Ib08baa8f57a281c75247ba3d9b9ab0211fe5d4fd Partial-bug: #1598906 --- tox.ini | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index e606b8c6..c2d59f53 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -U {opts} {packages} +install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} DISCOVER_DIRECTORY=murano/tests/unit @@ -23,9 +23,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 = {toxinidir}/tools/cover.sh {posargs} [testenv:docs] @@ -48,6 +56,10 @@ commands = oslo-config-generator --config-file etc/oslo-config-generator/murano-cfapi.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]