2015-11-19 17:27:07 -07:00
|
|
|
[tox]
|
2018-11-09 00:53:25 +07:00
|
|
|
minversion = 2.3.2
|
2017-02-08 09:57:12 +07:00
|
|
|
envlist = py35,py27,pep8
|
2015-11-19 17:27:07 -07:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
2015-12-10 00:58:12 -05:00
|
|
|
passenv = TRACE_FAILONLY
|
2018-03-07 20:29:45 +01:00
|
|
|
install_command = pip install {opts} {packages}
|
2015-11-19 17:27:07 -07:00
|
|
|
setenv =
|
2016-08-09 19:05:11 -04:00
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2018-05-24 11:07:41 -07:00
|
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
2015-12-10 00:58:12 -05:00
|
|
|
deps =
|
2018-03-07 20:29:45 +01:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
2015-12-10 00:58:12 -05:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
commands =
|
2018-05-24 11:07:41 -07:00
|
|
|
stestr run {posargs}
|
2015-11-19 17:27:07 -07:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2016-07-06 15:51:51 -06:00
|
|
|
commands =
|
|
|
|
flake8
|
2017-02-10 11:15:01 +09:00
|
|
|
{toxinidir}/tools/check_samples.sh
|
2018-06-14 11:38:33 -04:00
|
|
|
{[testenv:bandit]commands}
|
2015-11-19 17:27:07 -07:00
|
|
|
|
2016-10-19 09:20:50 -07:00
|
|
|
[testenv:releasenotes]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2018-03-23 20:02:14 +08:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-10-19 09:20:50 -07:00
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
2015-11-19 17:27:07 -07:00
|
|
|
[testenv:venv]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2015-11-19 17:27:07 -07:00
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2018-05-24 11:07:41 -07:00
|
|
|
setenv =
|
|
|
|
{[testenv]setenv}
|
|
|
|
PYTHON=coverage run --source neutron_lib --parallel-mode
|
2015-12-10 00:58:12 -05:00
|
|
|
commands =
|
2018-05-24 11:07:41 -07:00
|
|
|
stestr run --no-subunit-trace {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
2015-11-19 17:27:07 -07:00
|
|
|
|
|
|
|
[testenv:docs]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2018-03-23 20:02:14 +08:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
2015-11-19 17:27:07 -07:00
|
|
|
|
2016-06-07 19:07:45 +09:00
|
|
|
[testenv:api-ref]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2016-06-07 19:07:45 +09:00
|
|
|
whitelist_externals = rm
|
2018-04-23 14:57:08 +02:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2016-06-07 19:07:45 +09:00
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
|
|
|
2017-09-21 13:45:59 -06:00
|
|
|
[testenv:linkcheck]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2018-04-23 11:24:08 -06:00
|
|
|
deps =
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2017-09-21 13:45:59 -06:00
|
|
|
whitelist_externals = rm
|
|
|
|
commands =
|
|
|
|
rm -rf api-ref/build
|
|
|
|
sphinx-build -W -b linkcheck api-ref/source api-ref/build/linkcheck
|
|
|
|
rm -rf doc/build
|
|
|
|
sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
|
|
|
|
2015-11-19 17:27:07 -07:00
|
|
|
[testenv:debug]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2017-03-09 22:49:02 +07:00
|
|
|
commands = oslo_debug_helper -t neutron_lib/tests/unit {posargs}
|
2015-11-19 17:27:07 -07:00
|
|
|
|
2016-07-06 15:51:51 -06:00
|
|
|
[testenv:api-report]
|
2018-06-06 15:27:00 -04:00
|
|
|
basepython = python3
|
2016-07-06 15:51:51 -06:00
|
|
|
commands =
|
|
|
|
{toxinidir}/tools/api_report.sh
|
|
|
|
|
2015-11-19 17:27:07 -07:00
|
|
|
[flake8]
|
2016-12-07 14:32:56 -07:00
|
|
|
# H904: Delay string interpolations at logging calls
|
|
|
|
enable-extensions=H904
|
2015-11-19 17:27:07 -07:00
|
|
|
show-source = True
|
2016-07-06 15:51:51 -06:00
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools
|
2017-07-05 00:53:13 -07:00
|
|
|
import-order-style = pep8
|
2016-01-14 14:41:03 -06:00
|
|
|
|
2018-06-14 11:38:33 -04:00
|
|
|
[testenv:bandit]
|
|
|
|
# B104: Possible binding to all interfaces
|
2018-08-21 09:23:22 +02:00
|
|
|
# B303: Blacklist use of insecure MD2, MD4, MD5, or SHA1 hash functions
|
2018-04-09 14:33:58 -06:00
|
|
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
|
2018-06-14 11:38:33 -04:00
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
2018-08-21 09:23:22 +02:00
|
|
|
commands = bandit -r neutron_lib -x tests -n5 -s B104,B303,B311
|
2018-06-14 11:38:33 -04:00
|
|
|
|
2016-01-14 14:41:03 -06:00
|
|
|
[hacking]
|
|
|
|
import_exceptions = neutron_lib._i18n
|
2016-12-07 14:11:33 -07:00
|
|
|
local-check-factory = neutron_lib.hacking.checks._neutron_lib_factory
|
2018-03-22 16:36:02 -04:00
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
basepython = python3
|
|
|
|
deps =
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|