Add -constraints sections for base CI jobs

Using factors with sections is not a thing and likely will not be for
a while, as such we are going to have to duplicate sections to be able
to set the constraints based install_command.

Implements Blueprint: Requirements-Management

Change-Id: Ie679904330a83e4b7eb75c189b48afef127b0d22
This commit is contained in:
Sachi King 2015-09-28 15:20:19 +10:00 committed by Cedric Brandily
parent cecf2a5883
commit 44905578fd
1 changed files with 33 additions and 1 deletions

34
tox.ini
View File

@ -8,7 +8,7 @@ setenv = VIRTUAL_ENV={envdir}
passenv = TRACE_FAILONLY
usedevelop = True
install_command =
constraints: pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
constraints: {[testenv:common-constraints]install_command}
pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
@ -31,6 +31,9 @@ setenv = {[testenv]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} {opts} {packages}
[testenv:dsvm]
# Fake job to define environment variables shared between dsvm jobs
setenv = OS_SUDO_TESTING=1
@ -104,17 +107,46 @@ whitelist_externals =
sh
bash
[testenv:pep8-constraints]
basepython = {[testenv:pep8]basepython}
install_command = {[testenv:common-constraints]install_command}
deps =
{[testenv]deps}
commands=
# If it is easier to add a check via a shell script, consider adding it in this file
sh ./tools/misc-sanity-checks.sh
{toxinidir}/tools/check_unit_test_structure.sh
# Checks for coding and style guidelines
flake8
sh ./tools/coding-checks.sh --pylint '{posargs}'
neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
whitelist_externals = {[testenv:pep8]whitelist_externals}
[testenv:cover]
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]
commands = {posargs}
[testenv:venv-constraints]
install_command = {[testenv:common-constraints]install_command}
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]
# E125 continuation line does not distinguish itself from next logical line
# E126 continuation line over-indented for hanging indent