2017-02-24 15:02:19 -05:00
|
|
|
[tox]
|
2023-01-23 16:14:00 +01:00
|
|
|
minversion = 3.18.0
|
2021-04-20 16:58:58 +08:00
|
|
|
envlist = py3,pep8
|
2019-01-29 16:17:28 +08:00
|
|
|
ignore_basepython_conflict = True
|
2017-02-24 15:02:19 -05:00
|
|
|
|
|
|
|
[testenv]
|
2023-01-23 16:14:00 +01:00
|
|
|
basepython = {env:TOX_PYTHON:python3}
|
2017-02-24 15:02:19 -05:00
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2021-11-24 17:23:51 -06: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}
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
|
2017-12-01 14:57:54 +01:00
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
deps =
|
2019-04-23 19:39:46 +08:00
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2017-12-01 14:57:54 +01:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
-r{toxinidir}/requirements.txt
|
2024-01-27 23:13:16 +09:00
|
|
|
hacking>=6.1.0,<6.2.0 # Apache-2.0
|
2018-07-10 15:04:13 +07:00
|
|
|
commands = stestr run --slowest {posargs}
|
2017-02-24 15:02:19 -05:00
|
|
|
|
|
|
|
[testenv:pep8]
|
2018-08-20 16:09:10 -05:00
|
|
|
commands = flake8
|
2023-01-23 16:14:00 +01:00
|
|
|
bash {toxinidir}/tools/coding-checks.sh --all '{posargs}'
|
2021-12-22 02:11:49 +00:00
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
2024-01-27 23:13:16 +09:00
|
|
|
pylint==2.17.4 # GPLv2
|
2023-01-23 16:14:00 +01:00
|
|
|
allowlist_externals = bash
|
2017-02-24 15:02:19 -05:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
|
|
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
|
|
|
|
|
|
|
[testenv:docs]
|
2019-09-05 08:01:07 +02:00
|
|
|
deps =
|
2021-05-11 17:55:24 -04:00
|
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/xena}
|
2019-09-05 08:01:07 +02:00
|
|
|
-r{toxinidir}/doc/requirements.txt
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
2017-02-24 15:02:19 -05:00
|
|
|
|
2019-08-27 18:30:20 +09:00
|
|
|
[testenv:pdf-docs]
|
|
|
|
deps = {[testenv:docs]deps}
|
2023-01-23 16:14:00 +01:00
|
|
|
allowlist_externals =
|
2019-08-27 18:30:20 +09:00
|
|
|
make
|
|
|
|
commands =
|
|
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
|
|
make -C doc/build/pdf
|
|
|
|
|
2017-02-24 15:02:19 -05:00
|
|
|
[testenv:releasenotes]
|
2019-09-05 08:01:07 +02:00
|
|
|
deps =
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2017-02-24 15:02:19 -05:00
|
|
|
commands =
|
|
|
|
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
|
|
[testenv:debug]
|
|
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
|
2017-03-16 17:52:12 -05:00
|
|
|
[testenv:functional]
|
2017-03-22 06:09:35 -04:00
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
OS_TEST_PATH=./ovsdbapp/tests/functional
|
2019-09-20 13:22:35 -05:00
|
|
|
OVN_SRCDIR={envdir}/src/ovn
|
2023-04-03 15:19:28 -05:00
|
|
|
OVS_SRCDIR={envdir}/src/ovn/ovs
|
2023-09-27 18:13:10 +03:00
|
|
|
VTEP_SRCDIR={envdir}/src/ovn/ovs/vtep
|
2019-12-17 06:42:36 -05:00
|
|
|
OVN_BRANCH={env:OVN_BRANCH:}
|
2017-07-07 16:42:33 -05:00
|
|
|
passenv = KEEP_VENV
|
2017-12-01 14:57:54 +01:00
|
|
|
commands =
|
2023-01-23 16:14:00 +01:00
|
|
|
bash {toxinidir}/tools/setup-ovs.sh
|
2017-12-01 14:57:54 +01:00
|
|
|
{[testenv]commands}
|
2023-01-23 16:14:00 +01:00
|
|
|
allowlist_externals = bash
|
2017-03-16 17:52:12 -05:00
|
|
|
|
2017-02-24 15:02:19 -05:00
|
|
|
[flake8]
|
2019-01-29 16:17:28 +08:00
|
|
|
# W504 line break after binary operator
|
|
|
|
ignore = W504
|
|
|
|
# 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
|
2017-02-24 15:02:19 -05:00
|
|
|
show-source = True
|
|
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
2019-01-29 16:17:28 +08:00
|
|
|
import-order-style = pep8
|