From 315958aab8273cd2dbfdd617b173d5c063a88948 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Wed, 9 Mar 2016 11:30:20 +1100 Subject: [PATCH] Use upper-constraints in tox test environments Recently OpenStack introduced a mechanism to specify a constrained "working set" of packages that are "guaranteed" to produce a working OpenStack environment. This pinning of packages limits the more broadly-defined requirements.txt which is managed by global-requirements. This patch modifies our tox test environment to use upper-constraints and explictly removes those requirements from the "venv" tox environment that is used by some commands in infra. Change-Id: I84582370e139fc5812bc85ae5341f7f9c8b93ff5 Closes-Bug: 1554791 --- tox.ini | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 20bcd37424..220b63c4aa 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ skipsdist = True [testenv] basepython=python2.7 -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} INTEGRATION_TESTS=0 @@ -86,6 +86,10 @@ commands = /bin/bash {toxinidir}/run_tests.sh --compilemessages -N [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:manage] @@ -127,6 +131,10 @@ setenv = DJANGO_SETTINGS_MODULE=openstack_dashboard.test.settings commands = {envpython} {toxinidir}/setup.py build_sphinx [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 [testenv:runserver]