From dbcfe35111a922b0ddf153d61bbc8c7eff3f45d1 Mon Sep 17 00:00:00 2001 From: Niall Bunting Date: Thu, 31 Mar 2016 15:59:11 +0000 Subject: [PATCH] Magnum's tox test should respect upper-constraints 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. Change-Id: I962329075b11d3790dc586ba33fe19fc64f1e4f9 Closes-Bug: #1563038 --- tox.ini | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ef356c35d5..f84c71922f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ skipsdist = True usedevelop = True install_command = constraints: {[testenv:common-constraints]install_command} - pip install -U {opts} {packages} + pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages} whitelist_externals = bash find setenv = @@ -99,6 +99,10 @@ deps = {[testenv:bandit]deps} commands = {[testenv:bandit]commands} [testenv:cover] +# NOTE(NiallBunting) Infra does not support constraints for the cover +# job. While the file is set no file is there. Can be removed once infra +# changes this. +install_command = pip install -U {opts} {packages} commands = python setup.py testr --coverage --testr-args='{posargs}' coverage report @@ -107,6 +111,9 @@ install_command = {[testenv:common-constraints]install_command} commands = python setup.py testr --coverage --testr-args='{posargs}' [testenv:docs] +# NOTE(NiallBunting) This is a post job. So upper constraints will not +# apply here. +install_command = pip install -U {opts} {packages} commands = doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst python setup.py build_sphinx