]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Add -constraints sections for base CI jobs
authorSachi King <nakato@nakato.io>
Mon, 28 Sep 2015 05:20:19 +0000 (15:20 +1000)
committerCedric Brandily <zzelle@gmail.com>
Wed, 14 Oct 2015 10:48:05 +0000 (10:48 +0000)
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

tox.ini

diff --git a/tox.ini b/tox.ini
index 8f13b7fbd3adff50c17d1a3e0d94fdaed5a61552..a2fafe346daf4e1f843c5fd82bc7e91f99c76edf 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -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