OpenStack Networking (Neutron)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
6.8 KiB

envlist = docs,py35,py27,pep8
minversion = 2.3.2
skipsdist = True
setenv = VIRTUAL_ENV={envdir}
usedevelop = True
install_command =
pip install -U -c{env:UPPER_CONSTRAINTS_FILE:} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
whitelist_externals = sh
commands =
{toxinidir}/tools/ {posargs}
# there is also secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
commands = false
# 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
commands = false
basepython = python2.7
setenv = {[testenv]setenv}
deps =
basepython = python3.5
setenv = {[testenv:functional]setenv}
deps =
basepython = python2.7
setenv = {[testenv:functional]setenv}
deps =
commands =
{toxinidir}/tools/ {toxinidir} {envdir}/etc {envdir}/bin
{toxinidir}/tools/ {posargs}
basepython = python3.5
setenv = {[testenv:dsvm-functional]setenv}
deps =
commands =
{toxinidir}/tools/ {toxinidir} {envdir}/etc {envdir}/bin
{toxinidir}/tools/ {posargs}
basepython = python2.7
setenv = {[testenv]setenv}
# workaround for DB teardown lock contention (bug/1541742)
deps =
commands =
{toxinidir}/tools/ {envdir}
{toxinidir}/tools/ {toxinidir} {envdir}/etc {envdir}/bin
basepython = python3.5
setenv = {[testenv:dsvm-fullstack]setenv}
deps =
commands =
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
basepython = python2.7
deps =
# If it is easier to add a check via a shell script, consider adding it in this file
sh ./tools/
# Checks for coding and style guidelines
sh ./tools/ --pylint '{posargs}'
neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
python ./tools/
whitelist_externals =
basepython = python2.7
commands =
python testr --coverage --testr-args='{posargs}'
coverage report --fail-under=82 --skip-covered
commands = {posargs}
commands = sphinx-build -W -b html doc/source doc/build/html
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
# E125 continuation line does not distinguish itself from next logical line
# 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 '# '
# H404 multi line docstring should start with a summary
# H405 multi line docstring summary not separated with an empty line
# N530 direct neutron imports not allowed
# TODO(ihrachys) figure out what to do with N534 and N536
# N534 Untranslated exception message
# N536 Use assertIsNone rather than assertEqual to check for None values
# TODO(amotoki) check the following new rules should be fixed or ignored
# E402 module level import not at top of file
# E731 do not assign a lambda expression, use a def
# W503 line break before binary operator
ignore = E125,E126,E128,E129,E265,E402,E731,W503,H404,H405,N530,N534,N536
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H904: Delay string interpolations at logging calls
show-source = true
exclude = ./.*,build,dist,doc
import-order-style = pep8
import_exceptions = neutron._i18n
local-check-factory = neutron.hacking.checks.factory
# B101: Use of assert detected
# B104: Possible binding to all interfaces
# B108: Probable insecure usage of temp file/directory
# B111: Execute with run_as_root=True identified, possible security issue
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r neutron -x tests -n5 -s B101,B104,B108,B111,B311
commands = bash -c "find {toxinidir} \
-not \( -type d -name .tox\* -prune \) \
-not \( -type d -name .venv\* -prune \) \
-type f \
-name \*.sh \
# E005 file does not begin with #! or have a .sh prefix
# E006 check for lines longer than 79 columns
# E042 local declaration hides errors
# E043 Arithmetic compound has inconsistent return semantics
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
commands = {toxinidir}/tools/
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test