2012-01-10 17:44:27 -08:00
|
|
|
[tox]
|
2016-07-03 14:55:38 -04:00
|
|
|
envlist = docs,py35,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-08-08 00:04:05 -04:00
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
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 =
|
2016-04-04 11:41:05 +02:00
|
|
|
pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {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-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
|
|
|
|
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
|
|
|
|
|
|
|
|
[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
|
2016-04-08 15:34:28 -04:00
|
|
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
2015-06-24 21:31:33 +02:00
|
|
|
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
|
2016-04-08 15:34:28 -04:00
|
|
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
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-10-07 10:55:25 +02:00
|
|
|
[testenv:functional-py34]
|
|
|
|
basepython = python3.4
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
deps =
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
|
2016-07-03 14:55:38 -04:00
|
|
|
[testenv:functional-py35]
|
|
|
|
basepython = python3.5
|
|
|
|
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}
|
2016-02-11 09:51:54 -05:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
2014-10-14 14:09:14 +03:00
|
|
|
|
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}
|
2016-02-11 09:51:54 -05:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
2015-10-07 10:55:25 +02:00
|
|
|
|
2016-07-03 14:55:38 -04:00
|
|
|
[testenv:dsvm-functional-py35]
|
|
|
|
basepython = python3.5
|
|
|
|
setenv = {[testenv:dsvm-functional]setenv}
|
|
|
|
sitepackages={[testenv:dsvm-functional]sitepackages}
|
|
|
|
deps =
|
|
|
|
{[testenv:dsvm-functional]deps}
|
2016-02-11 09:51:54 -05:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
|
|
|
{toxinidir}/tools/ostestr_compat_shim.sh {posargs}
|
2015-10-07 10:55:25 +02:00
|
|
|
|
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}
|
2016-03-10 16:51:28 +09:00
|
|
|
# workaround for DB teardown lock contention (bug/1541742)
|
|
|
|
OS_TEST_TIMEOUT=600
|
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-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
|
|
|
|
|
|
|
[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
|
|
|
|
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
|
|
|
|
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
|
|
|
|
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
|
2016-07-08 01:30:52 -05:00
|
|
|
# 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
|
2016-04-24 15:19:20 +00:00
|
|
|
ignore = E125,E126,E128,E129,E265,H404,H405
|
2013-05-17 02:18:56 +00:00
|
|
|
show-source = true
|
2016-06-07 05:28:53 -07:00
|
|
|
exclude = ./.*,build,dist
|
2014-05-01 06:10:57 -07:00
|
|
|
|
|
|
|
[hacking]
|
2016-01-26 10:52:47 +09:00
|
|
|
import_exceptions = 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
|