From 249470f20eb7a58a976a2e2835e7a125d9121cb0 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 4 Mar 2016 15:26:00 +0100 Subject: [PATCH] Make all tox targets constrained Since neutron gate already switched to -constraints target, we need to keep those targets until we switch gate back to using targets without the postfix. This change effectively makes both types of targets identical. Note: override install_command for venv, releasenotes, and cover targets since corresponding gate jobs do not provide constraints file yet. Also removed cover-constraints target since it would never work in gate anyway. Conflicts: tools/tox_install.sh tox.ini Liberty changes: - tools/tox_install.sh not present in the branch; instead of backporting it, use pip install -U directly. Co-Authored-By: Ihar Hrachyshka Co-Authored-By: Andreas Jaeger Change-Id: Ica2d509df0c54496aba7cb3162565384cc5d34c8 (cherry picked from commit e297d7d7db6a04291ad059e35e378cf89f2618d5) --- tox.ini | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/tox.ini b/tox.ini index 240d6178e3f..89a593e79c4 100644 --- a/tox.ini +++ b/tox.ini @@ -8,8 +8,7 @@ setenv = VIRTUAL_ENV={envdir} passenv = TRACE_FAILONLY usedevelop = True install_command = - constraints: {[testenv:common-constraints]install_command} - pip install -U {opts} {packages} + pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/liberty} {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt whitelist_externals = sh @@ -29,7 +28,6 @@ setenv = {[testenv]setenv} [testenv:api-constraints] basepython = {[testenv:api]basepython} -install_command = {[testenv:common-constraints]install_command} passenv = {[testenv:api]passenv} setenv = {[testenv:api]setenv} @@ -38,8 +36,13 @@ setenv = {[testenv:api]setenv} setenv = OS_TEST_TIMEOUT=180 commands = false -[testenv:common-constraints] -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/liberty} {opts} {packages} +# TODO(ihrachys): remove this target once it is not used in gate +[testenv:py27-constraints] +basepython = python2.7 + +# TODO(ihrachys): remove this target once it is not used in gate +[testenv:py34-constraints] +basepython = python3.4 [testenv:dsvm] # Fake job to define environment variables shared between dsvm jobs @@ -60,7 +63,6 @@ deps = [testenv:functional-constraints] basepython = {[testenv:functional]basepython} -install_command = {[testenv:common-constraints]install_command} setenv = {[testenv:functional]setenv} deps = {[testenv:functional]deps} @@ -75,7 +77,6 @@ deps = [testenv:dsvm-functional-constraints] basepython = {[testenv:dsvm-functional]basepython} -install_command = {[testenv:common-constraints]install_command} setenv = {[testenv:dsvm-functional]setenv} sitepackages={[testenv:dsvm-functional]sitepackages} deps = @@ -91,7 +92,6 @@ deps = {[testenv:functional]deps} [testenv:dsvm-fullstack-constraints] -install_command = {[testenv:common-constraints]install_command} setenv = {[testenv:dsvm-fullstack]setenv} sitepackages={[testenv:dsvm-fullstack]sitepackages} @@ -103,6 +103,8 @@ sitepackages = True downloadcache = ~/cache/pip [testenv:releasenotes] +# TODO(ihrachys): remove once infra supports constraints for this target +install_command = pip install -U {opts} {packages} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html [testenv:pep8] @@ -123,7 +125,6 @@ whitelist_externals = [testenv:pep8-constraints] basepython = {[testenv:pep8]basepython} -install_command = {[testenv:common-constraints]install_command} deps = {[testenv]deps} commands= @@ -137,28 +138,27 @@ commands= whitelist_externals = {[testenv:pep8]whitelist_externals} [testenv:cover] +# TODO(ihrachys): remove once infra supports constraints for this target +install_command = pip install -U {opts} {packages} basepython = python2.7 commands = python setup.py testr --coverage --testr-args='{posargs}' -[testenv:cover-constraints] -basepython = {[testenv:cover]basepython} -install_command = {[testenv:common-constraints]install_command} -commands = - python setup.py testr --coverage --testr-args='{posargs}' - [testenv:venv] +# TODO(ihrachys): remove once infra supports constraints for this target +install_command = pip install -U {opts} {packages} commands = {posargs} +# TODO(ihrachys): remove this target once it is not used in gate [testenv:venv-constraints] -install_command = {[testenv:common-constraints]install_command} +# TODO(ihrachys): remove once infra supports constraints for this target +install_command = pip install -U {opts} {packages} commands = {posargs} [testenv:docs] commands = sphinx-build -W -b html doc/source doc/build/html [testenv:docs-constraints] -install_command = {[testenv:common-constraints]install_command} commands = {[testenv:docs]commands} [flake8]