2012-01-10 17:44:27 -08:00
|
|
|
|
[tox]
|
2015-09-30 20:50:13 -07:00
|
|
|
|
envlist = docs,py34,py27,pep8
|
2016-01-19 13:28:24 +00:00
|
|
|
|
minversion = 2.3.1
|
2013-12-09 14:02:49 +00:00
|
|
|
|
skipsdist = True
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
|
|
|
|
[testenv]
|
2012-02-29 09:39:03 -08:00
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2016-01-13 18:31:57 +08:00
|
|
|
|
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2013-12-09 14:02:49 +00:00
|
|
|
|
usedevelop = True
|
2015-09-01 15:10:54 +10:00
|
|
|
|
install_command =
|
2015-09-28 15:20:19 +10:00
|
|
|
|
constraints: {[testenv:common-constraints]install_command}
|
2015-09-01 15:10:54 +10:00
|
|
|
|
pip install -U {opts} {packages}
|
2013-05-30 13:36:22 +08:00
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2014-12-02 13:18:48 +09:00
|
|
|
|
whitelist_externals = sh
|
2013-03-07 12:41:30 -05:00
|
|
|
|
commands =
|
2015-05-13 13:39:20 -04:00
|
|
|
|
dsvm-functional: {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
2015-08-31 13:03:18 +08:00
|
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
2015-06-09 11:28:10 +02:00
|
|
|
|
# there is also secret magic in ostestr which lets you run in a fail only
|
2014-11-20 21:01:14 +00:00
|
|
|
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
2012-06-08 19:46:37 -04:00
|
|
|
|
|
2014-03-25 01:04:50 -07:00
|
|
|
|
[testenv:api]
|
2015-03-02 17:06:54 +11:00
|
|
|
|
basepython = python2.7
|
2015-11-24 15:13:00 +01:00
|
|
|
|
passenv = {[testenv]passenv} TEMPEST_CONFIG_DIR
|
2015-06-23 20:00:30 +02:00
|
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
|
OS_TEST_PATH=./neutron/tests/api
|
2016-01-05 19:36:42 +01:00
|
|
|
|
TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
|
2015-03-24 01:30:11 +00:00
|
|
|
|
OS_TEST_API_WITH_REST=1
|
2014-03-25 01:04:50 -07:00
|
|
|
|
|
2015-12-17 12:25:32 -08:00
|
|
|
|
[testenv:api-constraints]
|
|
|
|
|
basepython = {[testenv:api]basepython}
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
passenv = {[testenv:api]passenv}
|
|
|
|
|
setenv = {[testenv:api]setenv}
|
|
|
|
|
|
2015-06-24 21:31:33 +02:00
|
|
|
|
[testenv:common]
|
|
|
|
|
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
|
|
|
|
setenv = OS_TEST_TIMEOUT=180
|
|
|
|
|
commands = false
|
|
|
|
|
|
2015-09-28 15:20:19 +10:00
|
|
|
|
[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}
|
|
|
|
|
|
2015-06-24 21:31:33 +02:00
|
|
|
|
[testenv:dsvm]
|
|
|
|
|
# Fake job to define environment variables shared between dsvm jobs
|
|
|
|
|
setenv = OS_SUDO_TESTING=1
|
|
|
|
|
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
|
|
|
|
OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
|
|
|
|
|
OS_FAIL_ON_MISSING_DEPS=1
|
|
|
|
|
commands = false
|
|
|
|
|
|
2014-01-14 18:43:22 +00:00
|
|
|
|
[testenv:functional]
|
2015-03-02 17:06:54 +11:00
|
|
|
|
basepython = python2.7
|
2015-06-23 20:00:30 +02:00
|
|
|
|
setenv = {[testenv]setenv}
|
2015-06-24 21:31:33 +02:00
|
|
|
|
{[testenv:common]setenv}
|
2015-06-23 20:00:30 +02:00
|
|
|
|
OS_TEST_PATH=./neutron/tests/functional
|
2014-10-05 01:23:50 -04:00
|
|
|
|
deps =
|
|
|
|
|
{[testenv]deps}
|
|
|
|
|
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
2014-01-14 18:43:22 +00:00
|
|
|
|
|
2015-12-17 12:25:32 -08:00
|
|
|
|
[testenv:functional-constraints]
|
|
|
|
|
basepython = {[testenv:functional]basepython}
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
|
|
2015-10-07 10:55:25 +02:00
|
|
|
|
[testenv:functional-py34]
|
|
|
|
|
basepython = python3.4
|
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
|
|
2014-07-02 00:35:12 +00:00
|
|
|
|
[testenv:dsvm-functional]
|
2015-03-02 17:06:54 +11:00
|
|
|
|
basepython = python2.7
|
2015-06-24 21:31:33 +02:00
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
|
{[testenv:dsvm]setenv}
|
2014-10-14 14:09:14 +03:00
|
|
|
|
sitepackages=True
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
|
|
2015-12-17 12:25:32 -08:00
|
|
|
|
[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 =
|
|
|
|
|
{[testenv:functional-constraints]deps}
|
|
|
|
|
|
2015-10-07 10:55:25 +02:00
|
|
|
|
[testenv:dsvm-functional-py34]
|
|
|
|
|
basepython = python3.4
|
|
|
|
|
setenv = {[testenv:dsvm-functional]setenv}
|
|
|
|
|
sitepackages={[testenv:dsvm-functional]sitepackages}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:dsvm-functional]deps}
|
|
|
|
|
|
2015-12-05 17:17:13 -05:00
|
|
|
|
[testenv:dsvm-fullstack]
|
2015-06-23 20:00:30 +02:00
|
|
|
|
setenv = {[testenv]setenv}
|
2015-06-24 21:31:33 +02:00
|
|
|
|
{[testenv:common]setenv}
|
|
|
|
|
{[testenv:dsvm]setenv}
|
2015-12-05 17:17:13 -05:00
|
|
|
|
OS_TEST_PATH=./neutron/tests/fullstack
|
2014-09-17 19:48:41 +00:00
|
|
|
|
sitepackages=True
|
2014-10-05 01:23:50 -04:00
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
2014-07-02 00:35:12 +00:00
|
|
|
|
|
2015-12-17 12:25:32 -08:00
|
|
|
|
[testenv:dsvm-fullstack-constraints]
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv:dsvm-fullstack]setenv}
|
|
|
|
|
sitepackages={[testenv:dsvm-fullstack]sitepackages}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional-constraints]deps}
|
|
|
|
|
|
2015-11-04 20:41:26 +00:00
|
|
|
|
[testenv:releasenotes]
|
2015-11-25 18:32:17 +00:00
|
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
2015-11-04 20:41:26 +00:00
|
|
|
|
|
2012-01-10 17:44:27 -08:00
|
|
|
|
[testenv:pep8]
|
2015-03-02 17:06:54 +11:00
|
|
|
|
basepython = python2.7
|
2015-02-25 09:07:18 -08:00
|
|
|
|
deps =
|
|
|
|
|
{[testenv]deps}
|
|
|
|
|
commands=
|
2014-12-22 13:02:14 -08:00
|
|
|
|
# If it is easier to add a check via a shell script, consider adding it in this file
|
|
|
|
|
sh ./tools/misc-sanity-checks.sh
|
2015-04-04 00:22:05 +00:00
|
|
|
|
{toxinidir}/tools/check_unit_test_structure.sh
|
2015-02-25 21:53:27 -08:00
|
|
|
|
# Checks for coding and style guidelines
|
2013-05-17 02:18:56 +00:00
|
|
|
|
flake8
|
2015-06-30 14:56:28 -04:00
|
|
|
|
sh ./tools/coding-checks.sh --pylint '{posargs}'
|
2015-06-09 12:46:54 +02:00
|
|
|
|
neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
|
2015-11-09 23:37:37 +00:00
|
|
|
|
{[testenv:genconfig]commands}
|
2015-04-07 15:00:25 +00:00
|
|
|
|
whitelist_externals =
|
|
|
|
|
sh
|
|
|
|
|
bash
|
2012-01-25 01:23:12 -08:00
|
|
|
|
|
2015-09-28 15:20:19 +10:00
|
|
|
|
[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
|
2015-11-09 23:37:37 +00:00
|
|
|
|
{[testenv:genconfig]commands}
|
2015-09-28 15:20:19 +10:00
|
|
|
|
whitelist_externals = {[testenv:pep8]whitelist_externals}
|
|
|
|
|
|
2012-01-25 01:23:12 -08:00
|
|
|
|
[testenv:cover]
|
2015-03-02 17:06:54 +11:00
|
|
|
|
basepython = python2.7
|
2013-03-10 15:23:46 -07:00
|
|
|
|
commands =
|
2014-12-05 18:17:15 +01:00
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
2015-12-15 21:06:24 +00:00
|
|
|
|
coverage report
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
2015-09-28 15:20:19 +10:00
|
|
|
|
[testenv:cover-constraints]
|
|
|
|
|
basepython = {[testenv:cover]basepython}
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
commands =
|
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
|
|
2012-06-08 19:46:37 -04:00
|
|
|
|
[testenv:venv]
|
2012-02-29 09:39:03 -08:00
|
|
|
|
commands = {posargs}
|
2013-05-17 02:18:56 +00:00
|
|
|
|
|
2015-09-28 15:20:19 +10:00
|
|
|
|
[testenv:venv-constraints]
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
2014-08-21 21:24:51 +02:00
|
|
|
|
[testenv:docs]
|
2015-06-15 16:15:11 +02:00
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
2014-08-21 21:24:51 +02:00
|
|
|
|
|
2015-09-28 15:20:19 +10:00
|
|
|
|
[testenv:docs-constraints]
|
|
|
|
|
install_command = {[testenv:common-constraints]install_command}
|
|
|
|
|
commands = {[testenv:docs]commands}
|
|
|
|
|
|
2013-05-17 02:18:56 +00:00
|
|
|
|
[flake8]
|
|
|
|
|
# E125 continuation line does not distinguish itself from next logical line
|
2014-06-10 14:35:46 +00:00
|
|
|
|
# E126 continuation line over-indented for hanging indent
|
|
|
|
|
# E128 continuation line under-indented for visual indent
|
|
|
|
|
# E129 visually indented line with same indent as next logical line
|
|
|
|
|
# E265 block comment should start with ‘# ‘
|
2014-12-09 13:04:38 -07:00
|
|
|
|
# H404 multi line docstring should start with a summary
|
2014-06-10 14:35:46 +00:00
|
|
|
|
# H405 multi line docstring summary not separated with an empty line
|
2015-05-11 16:05:03 +02:00
|
|
|
|
ignore = E125,E126,E128,E129,E265,H404,H405
|
2013-05-17 02:18:56 +00:00
|
|
|
|
show-source = true
|
|
|
|
|
builtins = _
|
2015-02-21 00:15:12 +00:00
|
|
|
|
# neutron/tests/tempest needs to be excluded so long as it continues
|
|
|
|
|
# to be copied directly from tempest, since tempest and neutron do not
|
|
|
|
|
# share a flake8 configuration.
|
|
|
|
|
exclude = ./.*,build,dist,neutron/openstack/common/*,neutron/tests/tempest
|
2014-05-01 06:10:57 -07:00
|
|
|
|
|
|
|
|
|
[hacking]
|
2015-12-03 12:53:55 -07:00
|
|
|
|
import_exceptions = neutron.i18n, neutron._i18n
|
2014-05-01 06:10:57 -07:00
|
|
|
|
local-check-factory = neutron.hacking.checks.factory
|
2015-11-09 23:37:37 +00:00
|
|
|
|
|
|
|
|
|
[testenv:genconfig]
|
|
|
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|