2012-01-10 17:44:27 -08:00
|
|
|
|
[tox]
|
2014-11-25 16:58:49 +01:00
|
|
|
|
envlist = py27,py33,py34,pep8
|
2013-12-09 14:02:49 +00:00
|
|
|
|
minversion = 1.6
|
|
|
|
|
skipsdist = True
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
|
|
|
|
[testenv]
|
2014-07-25 13:30:00 -07:00
|
|
|
|
# Note the hash seed is set to 0 until neutron can be tested with a
|
|
|
|
|
# random hash seed successfully.
|
2012-02-29 09:39:03 -08:00
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-07-25 13:30:00 -07:00
|
|
|
|
PYTHONHASHSEED=0
|
2013-12-09 14:02:49 +00:00
|
|
|
|
usedevelop = True
|
|
|
|
|
install_command = 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-01-09 15:02:59 +00:00
|
|
|
|
dsvm-functional: {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envbindir}
|
2014-12-02 13:18:48 +09:00
|
|
|
|
sh tools/pretty_tox.sh '{posargs}'
|
2014-11-20 21:01:14 +00:00
|
|
|
|
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
|
|
|
|
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
2012-06-08 19:46:37 -04:00
|
|
|
|
|
2014-08-04 08:47:08 -04:00
|
|
|
|
[testenv:hashtest]
|
|
|
|
|
# This is the same as default environment, but with a random PYTHONHASHSEED.
|
|
|
|
|
# You can also specify a specific hashseed (for test repeatability) as follows:
|
|
|
|
|
# tox --hashseed 1235130571 -e hashtest
|
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
|
|
2014-03-25 01:04:50 -07:00
|
|
|
|
[testenv:api]
|
|
|
|
|
setenv = OS_TEST_PATH=./neutron/tests/api
|
|
|
|
|
|
2014-01-14 18:43:22 +00:00
|
|
|
|
[testenv:functional]
|
|
|
|
|
setenv = OS_TEST_PATH=./neutron/tests/functional
|
2014-12-12 18:39:56 +01:00
|
|
|
|
OS_TEST_TIMEOUT=90
|
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
|
|
|
|
|
2014-07-02 00:35:12 +00:00
|
|
|
|
[testenv:dsvm-functional]
|
|
|
|
|
setenv = OS_TEST_PATH=./neutron/tests/functional
|
|
|
|
|
OS_SUDO_TESTING=1
|
2015-01-09 15:02:59 +00:00
|
|
|
|
OS_ROOTWRAP_CMD=sudo {envbindir}/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
2014-07-02 00:35:12 +00:00
|
|
|
|
OS_FAIL_ON_MISSING_DEPS=1
|
2014-12-12 18:39:56 +01:00
|
|
|
|
OS_TEST_TIMEOUT=90
|
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
|
|
|
|
|
2012-06-08 19:46:37 -04:00
|
|
|
|
[tox:jenkins]
|
|
|
|
|
sitepackages = True
|
|
|
|
|
downloadcache = ~/cache/pip
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
|
|
|
|
[testenv:pep8]
|
2013-05-17 02:18:56 +00:00
|
|
|
|
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
|
2013-05-17 02:18:56 +00:00
|
|
|
|
flake8
|
2014-03-07 15:07:43 -05:00
|
|
|
|
neutron-db-manage check_migration
|
2014-10-17 12:30:38 +09:00
|
|
|
|
whitelist_externals = sh
|
2012-01-25 01:23:12 -08:00
|
|
|
|
|
|
|
|
|
[testenv:cover]
|
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}'
|
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]
|
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
|
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 ‘# ‘
|
|
|
|
|
# H305 imports not grouped correctly
|
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-01-12 17:27:14 +01:00
|
|
|
|
ignore = E125,E126,E128,E129,E265,H305,H404,H405
|
2013-05-17 02:18:56 +00:00
|
|
|
|
show-source = true
|
|
|
|
|
builtins = _
|
2015-01-31 23:49:38 -08:00
|
|
|
|
exclude = ./.*,build,dist,neutron/openstack/common/*
|
2014-05-01 06:10:57 -07:00
|
|
|
|
|
2014-08-20 13:38:14 +10:00
|
|
|
|
[testenv:pylint]
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv]deps}
|
|
|
|
|
pylint
|
|
|
|
|
commands =
|
|
|
|
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
|
|
|
|
|
|
2014-05-01 06:10:57 -07:00
|
|
|
|
[hacking]
|
2014-11-21 22:01:08 +01:00
|
|
|
|
import_exceptions = neutron.i18n
|
2014-05-01 06:10:57 -07:00
|
|
|
|
local-check-factory = neutron.hacking.checks.factory
|