2012-01-10 17:44:27 -08:00
|
|
|
|
[tox]
|
2019-04-22 06:33:12 -06:00
|
|
|
|
envlist = py36,py27,pep8,docs
|
2018-11-05 19:15:52 -08:00
|
|
|
|
minversion = 2.0
|
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-09 19:08:24 -04:00
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2016-06-29 14:22:49 -06: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
|
2019-04-29 15:48:09 -06:00
|
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
2018-03-19 17:41:30 +01:00
|
|
|
|
-r{toxinidir}/requirements.txt
|
2013-05-30 13:36:22 +08:00
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2018-03-21 11:54:41 -06:00
|
|
|
|
whitelist_externals =
|
|
|
|
|
sh
|
|
|
|
|
stestr
|
2015-02-02 18:10:09 -08:00
|
|
|
|
commands =
|
2018-03-05 10:32:55 -07:00
|
|
|
|
stestr run {posargs}
|
|
|
|
|
stestr slowest
|
2012-06-08 19:46:37 -04:00
|
|
|
|
|
2016-06-29 14:22:49 -06:00
|
|
|
|
[testenv:common]
|
|
|
|
|
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
|
|
|
|
setenv = OS_TEST_TIMEOUT=180
|
|
|
|
|
commands = false
|
2014-08-04 08:47:08 -04:00
|
|
|
|
|
2018-06-19 11:25:53 -06:00
|
|
|
|
[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 =
|
2019-04-29 15:48:09 -06:00
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/networking-l2gw#egg=networking_l2gw"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/networking-sfc#egg=networking_sfc"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/neutron-fwaas#egg=neutron_fwaas"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/neutron-dynamic-routing#egg=neutron_dynamic_routing"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/neutron-vpnaas#egg=neutron_vpnaas"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/octavia#egg=octavia"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/vmware-nsxlib#egg=vmware_nsxlib"
|
|
|
|
|
pip install -q -e "git+https://opendev.org/openstack/neutron#egg=neutron"
|
2018-06-19 11:25:53 -06:00
|
|
|
|
|
|
|
|
|
|
2014-01-14 18:43:22 +00:00
|
|
|
|
[testenv:functional]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2016-06-29 14:22:49 -06:00
|
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
|
{[testenv:common]setenv}
|
|
|
|
|
OS_TEST_PATH=./vmware_nsx/tests/functional
|
|
|
|
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
2015-08-16 08:30:55 -07:00
|
|
|
|
deps =
|
|
|
|
|
{[testenv]deps}
|
2015-09-14 18:08:51 -07:00
|
|
|
|
-r{toxinidir}/vmware_nsx/tests/functional/requirements.txt
|
2014-01-14 18:43:22 +00:00
|
|
|
|
|
2014-07-02 00:35:12 +00:00
|
|
|
|
[testenv:dsvm-functional]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2014-12-20 23:20:48 -08:00
|
|
|
|
setenv = OS_SUDO_TESTING=1
|
2014-07-02 00:35:12 +00:00
|
|
|
|
OS_FAIL_ON_MISSING_DEPS=1
|
2016-06-29 14:22:49 -06:00
|
|
|
|
OS_TEST_TIMEOUT=180
|
2014-09-17 19:48:41 +00:00
|
|
|
|
sitepackages=True
|
2015-08-16 08:30:55 -07:00
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
2016-06-29 14:22:49 -06:00
|
|
|
|
commands =
|
2018-03-05 10:32:55 -07:00
|
|
|
|
stestr run {posargs}
|
|
|
|
|
stestr slowest
|
2014-07-02 00:35:12 +00:00
|
|
|
|
|
2012-06-08 19:46:37 -04:00
|
|
|
|
[tox:jenkins]
|
|
|
|
|
sitepackages = True
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
2015-12-02 13:53:05 -08:00
|
|
|
|
[testenv:releasenotes]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2019-04-29 15:48:09 -06:00
|
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
2018-03-19 17:41:30 +01:00
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2015-12-02 13:53:05 -08:00
|
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
2016-09-11 18:34:42 -07:00
|
|
|
|
[testenv:py27]
|
2018-09-27 12:41:08 -06:00
|
|
|
|
basepython = python2.7
|
2016-09-11 18:34:42 -07:00
|
|
|
|
setenv = OS_FAIL_ON_MISSING_DEPS=1
|
|
|
|
|
|
2018-07-12 14:43:22 +07:00
|
|
|
|
[testenv:py36]
|
2018-09-27 12:41:08 -06:00
|
|
|
|
basepython = python3.6
|
2018-07-12 14:43:22 +07:00
|
|
|
|
setenv = OS_FAIL_ON_MISSING_DEPS=1
|
|
|
|
|
|
2018-03-21 11:54:41 -06:00
|
|
|
|
[testenv:py27-dev]
|
|
|
|
|
commands =
|
2018-06-19 11:25:53 -06:00
|
|
|
|
{[testenv:dev]commands}
|
|
|
|
|
pip freeze
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
stestr
|
|
|
|
|
|
|
|
|
|
[testenv:py3-dev]
|
2018-09-27 12:41:08 -06:00
|
|
|
|
basepython = python3.5
|
|
|
|
|
commands =
|
|
|
|
|
{[testenv:dev]commands}
|
|
|
|
|
pip freeze
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
stestr
|
|
|
|
|
|
|
|
|
|
[testenv:py36-dev]
|
|
|
|
|
basepython = python3.6
|
2018-06-19 11:25:53 -06:00
|
|
|
|
commands =
|
|
|
|
|
{[testenv:dev]commands}
|
2018-03-21 11:54:41 -06:00
|
|
|
|
pip freeze
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
stestr
|
|
|
|
|
|
2012-01-10 17:44:27 -08:00
|
|
|
|
[testenv:pep8]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2013-05-17 02:18:56 +00:00
|
|
|
|
commands =
|
2016-06-29 14:22:49 -06: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
|
|
|
|
|
# Checks for coding and style guidelines
|
2013-05-17 02:18:56 +00:00
|
|
|
|
flake8
|
2016-06-29 14:22:49 -06:00
|
|
|
|
sh ./tools/coding-checks.sh --pylint '{posargs}'
|
2015-08-14 03:34:28 -07:00
|
|
|
|
neutron-db-manage --subproject vmware-nsx check_migration
|
2016-04-06 12:02:31 -07:00
|
|
|
|
{[testenv:genconfig]commands}
|
2018-12-17 01:03:57 +09:00
|
|
|
|
{[testenv:genpolicy]commands}
|
2016-06-29 14:22:49 -06:00
|
|
|
|
whitelist_externals =
|
|
|
|
|
sh
|
|
|
|
|
bash
|
2012-01-25 01:23:12 -08:00
|
|
|
|
|
2018-03-21 11:54:41 -06:00
|
|
|
|
[testenv:pep8-dev]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2018-03-21 11:54:41 -06:00
|
|
|
|
commands =
|
2018-06-19 11:25:53 -06:00
|
|
|
|
{[testenv:dev]commands}
|
2018-03-21 11:54:41 -06:00
|
|
|
|
pip freeze
|
|
|
|
|
# If it is easier to add a check via a shell script, consider adding it in this file
|
|
|
|
|
sh ./tools/misc-sanity-checks.sh
|
|
|
|
|
# Checks for coding and style guidelines
|
|
|
|
|
flake8 {toxinidir}/vmware_nsx
|
|
|
|
|
sh ./tools/coding-checks.sh --pylint '{posargs}'
|
|
|
|
|
neutron-db-manage --subproject vmware-nsx check_migration
|
|
|
|
|
{[testenv:genconfig]commands}
|
2018-12-17 01:03:57 +09:00
|
|
|
|
{[testenv:genpolicy]commands}
|
2018-03-21 11:54:41 -06:00
|
|
|
|
whitelist_externals =
|
|
|
|
|
sh
|
|
|
|
|
|
2016-02-04 15:33:29 -08:00
|
|
|
|
[testenv:bandit]
|
|
|
|
|
commands = bandit -r vmware_nsx -n 5 -ll
|
|
|
|
|
|
2012-01-25 01:23:12 -08:00
|
|
|
|
[testenv:cover]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2013-03-10 15:23:46 -07:00
|
|
|
|
commands =
|
2014-12-20 23:20:48 -08:00
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
2016-07-05 13:51:57 -07:00
|
|
|
|
coverage report
|
2012-01-10 17:44:27 -08:00
|
|
|
|
|
2014-08-21 21:24:51 +02:00
|
|
|
|
[testenv:docs]
|
2018-06-19 11:25:53 -06:00
|
|
|
|
basepython = python3
|
2019-04-29 15:48:09 -06:00
|
|
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
2018-03-19 17:41:30 +01:00
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2018-02-01 16:22:21 -06:00
|
|
|
|
commands = sphinx-build -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
|
|
|
|
|
# E265 block comment should start with ‘# ‘
|
|
|
|
|
# H305 imports not grouped correctly
|
|
|
|
|
# H307 like imports should be grouped together
|
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
|
|
|
|
|
# H904 Wrap long lines in parentheses instead of a backslash
|
2016-04-24 23:21:55 -05:00
|
|
|
|
# TODO(dougwig) -- uncomment this to test for remaining linkages
|
|
|
|
|
# N530 direct neutron imports not allowed
|
2017-03-26 04:41:58 -07:00
|
|
|
|
# N531 translations hints
|
|
|
|
|
ignore = E125,E126,E128,E129,E265,H305,H307,H404,H405,H904,N530,N531
|
2013-05-17 02:18:56 +00:00
|
|
|
|
show-source = true
|
|
|
|
|
builtins = _
|
2016-11-24 18:09:43 +08:00
|
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject
|
2017-07-04 23:12:58 -07:00
|
|
|
|
import-order-style = pep8
|
2014-05-01 06:10:57 -07:00
|
|
|
|
|
|
|
|
|
[hacking]
|
2016-01-27 11:09:01 -08:00
|
|
|
|
import_exceptions = vmware_nsx._i18n,
|
2016-04-24 23:21:55 -05:00
|
|
|
|
local-check-factory = neutron_lib.hacking.checks.factory
|
2016-04-06 12:02:31 -07:00
|
|
|
|
|
|
|
|
|
[testenv:genconfig]
|
|
|
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
2016-06-29 14:22:49 -06:00
|
|
|
|
|
2018-12-17 01:03:57 +09:00
|
|
|
|
[testenv:genpolicy]
|
|
|
|
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
|
|
|
|
|
|
2016-06-29 14:22:49 -06:00
|
|
|
|
[testenv:uuidgen]
|
|
|
|
|
commands =
|
|
|
|
|
check-uuid --fix
|
2018-03-25 11:42:36 +03:00
|
|
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
|
basepython = python3
|
2018-06-07 14:21:09 -06:00
|
|
|
|
deps =
|
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
|
|
|
|
|
[testenv:lower-constraints-dev]
|
|
|
|
|
basepython = python3
|
2018-03-25 11:42:36 +03:00
|
|
|
|
commands =
|
2018-06-19 11:25:53 -06:00
|
|
|
|
{[testenv:dev]commands}
|
2018-03-25 11:42:36 +03:00
|
|
|
|
pip freeze
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
deps =
|
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
|
-r{toxinidir}/requirements.txt
|
2018-07-19 13:20:56 -06:00
|
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
|
commands = {posargs}
|