From 5ad7fe92690b29a05c6284aa52e01913b5b7cf76 Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Tue, 16 Mar 2021 16:47:12 +0100 Subject: [PATCH] Always constraint dependencies in tox For most of our tox jobs we use the usedevelop, which means that tox will do a pip install -e on our source code on its own. This means that first it will install deps (which has the constraints) and then cinder without constraints, since they are defined in deps, and will pull cinder dependencies ignoring the constraints. This patch changes how we install dependencies for all tox jobs except the lower-constraints one, and will make sure that they are always properly constrained by changing our install_command to include the -c option. Change-Id: Ic9a6ac412a334710eb5e45935cd301ca80a5edb9 --- tox.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index ef9add803dc..b064e51db30 100644 --- a/tox.ini +++ b/tox.ini @@ -16,9 +16,9 @@ setenv = VIRTUAL_ENV={envdir} OS_TEST_TIMEOUT=60 OS_TEST_PATH=./cinder/tests/unit usedevelop = True +install_command=python -m pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} -deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/test-requirements.txt +deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt # By default stestr will set concurrency @@ -123,7 +123,6 @@ commands = {posargs} [testenv:docs] deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/doc/requirements.txt commands = rm -fr doc/source/contributor/api/ @@ -224,6 +223,7 @@ ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/* extension=.txt,.rst,.inc [testenv:lower-constraints] +install_command=python -m pip install {opts} {packages} deps = -c{toxinidir}/lower-constraints.txt -r{toxinidir}/test-requirements.txt