neutron-classifier/tox.ini

131 lines
3.7 KiB
INI

[tox]
envlist = py36,py27,pep8,docs
minversion = 2.0
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
usedevelop = True
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals =
sh
stestr
commands =
stestr run {posargs}
stestr slowest
[testenv:releasenotes]
basepython = python3
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:bandit]
# B104: Possible binding to all interfaces
# B303: Blacklist use of insecure MD2, MD4, MD5, or SHA1 hash functions
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -r neutron_classifier -x tests -n5 -s B104,B303,B311
[testenv:pep8]
basepython = python3
commands =
flake8
{[testenv:bandit]commands}
[testenv:dsvm]
basepython = python3
setenv = OS_FAIL_ON_MISSING_DEPS=1
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:dev]
# run locally (not in the gate) using editable mode
# https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
# note that order is important to ensure dependencies don't override
commands =
pip install -q -e "git+https://opendev.org/openstack/neutron#egg=neutron"
[testenv:dsvm-functional]
basepython = python3
setenv =
{[testenv]setenv}
OS_TEST_PATH=./neutron_classifier/tests/functional
OS_SUDO_TESTING=1
OS_FAIL_ON_MISSING_DEPS=1
OS_TEST_TIMEOUT=180
OS_TESTR_CONCURRENCY=1
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
deps =
{[testenv]deps}
-r{toxinidir}/neutron_classifier/tests/functional/requirements.txt
commands =
stestr run {posargs}
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source neutron_classifier --parallel-mode
commands =
stestr run {posargs}
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[flake8]
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality
# H205: Use assert(Greater|Less)(Equal) for comparison
# H904: Delay string interpolations at logging calls
enable-extensions=H106,H203,H204,H205,H904
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
import-order-style = pep8
[hacking]
import_exceptions = vmware_nsx._i18n,
local-check-factory = neutron_lib.hacking.checks.factory
[testenv:lower-constraints]
basepython = python3
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
[testenv:py27-dev]
basepython = python2.7
commands =
{[testenv:dev]commands}
pip freeze
stestr run {posargs}
whitelist_externals =
stestr
[testenv:py3-dev]
basepython = python3
commands =
{[testenv:dev]commands}
pip freeze
stestr run {posargs}
whitelist_externals =
stestr