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 <ihrachys@redhat.com>
Co-Authored-By: Andreas Jaeger <aj@suse.com>
Change-Id: Ica2d509df0c54496aba7cb3162565384cc5d34c8
(cherry picked from commit e297d7d7db)
This commit is contained in:
Ihar Hrachyshka 2016-03-04 15:26:00 +01:00
parent 7a03db00f7
commit 249470f20e
1 changed files with 17 additions and 17 deletions

34
tox.ini
View File

@ -8,8 +8,7 @@ setenv = VIRTUAL_ENV={envdir}
passenv = TRACE_FAILONLY passenv = TRACE_FAILONLY
usedevelop = True usedevelop = True
install_command = install_command =
constraints: {[testenv:common-constraints]install_command} pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/liberty} {opts} {packages}
pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
whitelist_externals = sh whitelist_externals = sh
@ -29,7 +28,6 @@ setenv = {[testenv]setenv}
[testenv:api-constraints] [testenv:api-constraints]
basepython = {[testenv:api]basepython} basepython = {[testenv:api]basepython}
install_command = {[testenv:common-constraints]install_command}
passenv = {[testenv:api]passenv} passenv = {[testenv:api]passenv}
setenv = {[testenv:api]setenv} setenv = {[testenv:api]setenv}
@ -38,8 +36,13 @@ setenv = {[testenv:api]setenv}
setenv = OS_TEST_TIMEOUT=180 setenv = OS_TEST_TIMEOUT=180
commands = false commands = false
[testenv:common-constraints] # TODO(ihrachys): remove this target once it is not used in gate
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} [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] [testenv:dsvm]
# Fake job to define environment variables shared between dsvm jobs # Fake job to define environment variables shared between dsvm jobs
@ -60,7 +63,6 @@ deps =
[testenv:functional-constraints] [testenv:functional-constraints]
basepython = {[testenv:functional]basepython} basepython = {[testenv:functional]basepython}
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv:functional]setenv} setenv = {[testenv:functional]setenv}
deps = deps =
{[testenv:functional]deps} {[testenv:functional]deps}
@ -75,7 +77,6 @@ deps =
[testenv:dsvm-functional-constraints] [testenv:dsvm-functional-constraints]
basepython = {[testenv:dsvm-functional]basepython} basepython = {[testenv:dsvm-functional]basepython}
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv:dsvm-functional]setenv} setenv = {[testenv:dsvm-functional]setenv}
sitepackages={[testenv:dsvm-functional]sitepackages} sitepackages={[testenv:dsvm-functional]sitepackages}
deps = deps =
@ -91,7 +92,6 @@ deps =
{[testenv:functional]deps} {[testenv:functional]deps}
[testenv:dsvm-fullstack-constraints] [testenv:dsvm-fullstack-constraints]
install_command = {[testenv:common-constraints]install_command}
setenv = setenv =
{[testenv:dsvm-fullstack]setenv} {[testenv:dsvm-fullstack]setenv}
sitepackages={[testenv:dsvm-fullstack]sitepackages} sitepackages={[testenv:dsvm-fullstack]sitepackages}
@ -103,6 +103,8 @@ sitepackages = True
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
[testenv:releasenotes] [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 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8] [testenv:pep8]
@ -123,7 +125,6 @@ whitelist_externals =
[testenv:pep8-constraints] [testenv:pep8-constraints]
basepython = {[testenv:pep8]basepython} basepython = {[testenv:pep8]basepython}
install_command = {[testenv:common-constraints]install_command}
deps = deps =
{[testenv]deps} {[testenv]deps}
commands= commands=
@ -137,28 +138,27 @@ commands=
whitelist_externals = {[testenv:pep8]whitelist_externals} whitelist_externals = {[testenv:pep8]whitelist_externals}
[testenv:cover] [testenv:cover]
# TODO(ihrachys): remove once infra supports constraints for this target
install_command = pip install -U {opts} {packages}
basepython = python2.7 basepython = python2.7
commands = commands =
python setup.py testr --coverage --testr-args='{posargs}' 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] [testenv:venv]
# TODO(ihrachys): remove once infra supports constraints for this target
install_command = pip install -U {opts} {packages}
commands = {posargs} commands = {posargs}
# TODO(ihrachys): remove this target once it is not used in gate
[testenv:venv-constraints] [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} commands = {posargs}
[testenv:docs] [testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:docs-constraints] [testenv:docs-constraints]
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:docs]commands} commands = {[testenv:docs]commands}
[flake8] [flake8]