2 envlist = docs,py34,py27,pep8
7 setenv = VIRTUAL_ENV={envdir}
8 passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
11 constraints: {[testenv:common-constraints]install_command}
12 pip install -U {opts} {packages}
13 deps = -r{toxinidir}/requirements.txt
14 -r{toxinidir}/test-requirements.txt
15 whitelist_externals = sh
17 dsvm-functional: {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
18 {toxinidir}/tools/ostestr_compat_shim.sh {posargs}
19 # there is also secret magic in ostestr which lets you run in a fail only
20 # mode. To do this define the TRACE_FAILONLY environmental variable.
23 basepython = python2.7
24 passenv = {[testenv]passenv} TEMPEST_CONFIG_DIR
25 setenv = {[testenv]setenv}
26 OS_TEST_PATH=./neutron/tests/api
27 TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
28 OS_TEST_API_WITH_REST=1
30 [testenv:api-constraints]
31 basepython = {[testenv:api]basepython}
32 install_command = {[testenv:common-constraints]install_command}
33 passenv = {[testenv:api]passenv}
34 setenv = {[testenv:api]setenv}
37 # Fake job to define environment variables shared between dsvm/non-dsvm jobs
38 setenv = OS_TEST_TIMEOUT=180
41 [testenv:common-constraints]
42 install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
45 # Fake job to define environment variables shared between dsvm jobs
46 setenv = OS_SUDO_TESTING=1
47 OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
48 OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
49 OS_FAIL_ON_MISSING_DEPS=1
53 basepython = python2.7
54 setenv = {[testenv]setenv}
55 {[testenv:common]setenv}
56 OS_TEST_PATH=./neutron/tests/functional
59 -r{toxinidir}/neutron/tests/functional/requirements.txt
61 [testenv:functional-constraints]
62 basepython = {[testenv:functional]basepython}
63 install_command = {[testenv:common-constraints]install_command}
64 setenv = {[testenv:functional]setenv}
66 {[testenv:functional]deps}
68 [testenv:functional-py34]
69 basepython = python3.4
70 setenv = {[testenv:functional]setenv}
72 {[testenv:functional]deps}
74 [testenv:dsvm-functional]
75 basepython = python2.7
76 setenv = {[testenv:functional]setenv}
77 {[testenv:dsvm]setenv}
80 {[testenv:functional]deps}
82 [testenv:dsvm-functional-constraints]
83 basepython = {[testenv:dsvm-functional]basepython}
84 install_command = {[testenv:common-constraints]install_command}
85 setenv = {[testenv:dsvm-functional]setenv}
86 sitepackages={[testenv:dsvm-functional]sitepackages}
88 {[testenv:functional-constraints]deps}
90 [testenv:dsvm-functional-py34]
91 basepython = python3.4
92 setenv = {[testenv:dsvm-functional]setenv}
93 sitepackages={[testenv:dsvm-functional]sitepackages}
95 {[testenv:dsvm-functional]deps}
97 [testenv:dsvm-fullstack]
98 setenv = {[testenv]setenv}
99 {[testenv:common]setenv}
100 {[testenv:dsvm]setenv}
101 OS_TEST_PATH=./neutron/tests/fullstack
104 {[testenv:functional]deps}
106 [testenv:dsvm-fullstack-constraints]
107 install_command = {[testenv:common-constraints]install_command}
109 {[testenv:dsvm-fullstack]setenv}
110 sitepackages={[testenv:dsvm-fullstack]sitepackages}
112 {[testenv:functional-constraints]deps}
114 [testenv:releasenotes]
115 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
118 basepython = python2.7
122 # If it is easier to add a check via a shell script, consider adding it in this file
123 sh ./tools/misc-sanity-checks.sh
124 {toxinidir}/tools/check_unit_test_structure.sh
125 # Checks for coding and style guidelines
127 sh ./tools/coding-checks.sh --pylint '{posargs}'
128 neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
129 {[testenv:genconfig]commands}
130 whitelist_externals =
134 [testenv:pep8-constraints]
135 basepython = {[testenv:pep8]basepython}
136 install_command = {[testenv:common-constraints]install_command}
140 # If it is easier to add a check via a shell script, consider adding it in this file
141 sh ./tools/misc-sanity-checks.sh
142 {toxinidir}/tools/check_unit_test_structure.sh
143 # Checks for coding and style guidelines
145 sh ./tools/coding-checks.sh --pylint '{posargs}'
146 neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
147 {[testenv:genconfig]commands}
148 whitelist_externals = {[testenv:pep8]whitelist_externals}
151 basepython = python2.7
153 python setup.py testr --coverage --testr-args='{posargs}'
156 [testenv:cover-constraints]
157 basepython = {[testenv:cover]basepython}
158 install_command = {[testenv:common-constraints]install_command}
160 python setup.py testr --coverage --testr-args='{posargs}'
165 [testenv:venv-constraints]
166 install_command = {[testenv:common-constraints]install_command}
170 commands = sphinx-build -W -b html doc/source doc/build/html
172 [testenv:docs-constraints]
173 install_command = {[testenv:common-constraints]install_command}
174 commands = {[testenv:docs]commands}
177 # E125 continuation line does not distinguish itself from next logical line
178 # E126 continuation line over-indented for hanging indent
179 # E128 continuation line under-indented for visual indent
180 # E129 visually indented line with same indent as next logical line
181 # E265 block comment should start with ‘# ‘
182 # H404 multi line docstring should start with a summary
183 # H405 multi line docstring summary not separated with an empty line
184 ignore = E125,E126,E128,E129,E265,H404,H405
187 # neutron/tests/tempest needs to be excluded so long as it continues
188 # to be copied directly from tempest, since tempest and neutron do not
189 # share a flake8 configuration.
190 exclude = ./.*,build,dist,neutron/openstack/common/*,neutron/tests/tempest
193 import_exceptions = neutron.i18n, neutron._i18n
194 local-check-factory = neutron.hacking.checks.factory
197 commands = {toxinidir}/tools/generate_config_file_samples.sh