2015-07-14 21:25:28 +03:00
|
|
|
[tox]
|
2016-11-21 15:39:09 +08:00
|
|
|
minversion = 2.3.1
|
2020-09-18 00:43:19 +08:00
|
|
|
envlist = py38,pep8
|
2015-07-14 21:25:28 +03:00
|
|
|
|
|
|
|
[testenv]
|
|
|
|
# Note the hash seed is set to 0 until neutron can be tested with a
|
|
|
|
# random hash seed successfully.
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
PYTHONHASHSEED=0
|
2016-08-09 19:48:15 -04:00
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
2015-07-14 21:25:28 +03:00
|
|
|
usedevelop = True
|
2021-01-05 22:18:00 -03:00
|
|
|
install_command = pip install {opts} {packages}
|
2022-07-26 17:14:56 +08:00
|
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
2021-01-05 22:18:00 -03:00
|
|
|
-r{toxinidir}/requirements.txt
|
2015-07-14 21:25:28 +03:00
|
|
|
-r{toxinidir}/test-requirements.txt
|
2021-01-05 22:18:00 -03:00
|
|
|
|
2023-01-31 03:41:13 +00:00
|
|
|
allowlist_externals = sh
|
2015-12-07 07:09:09 +00:00
|
|
|
find
|
|
|
|
commands = find . -type f -name "*.py[c|o]" -delete
|
2018-10-28 21:19:58 +00:00
|
|
|
stestr run {posargs}
|
2015-07-14 21:25:28 +03:00
|
|
|
|
2015-12-08 08:18:44 +02:00
|
|
|
[testenv:fullstack]
|
2016-07-15 22:18:20 +08:00
|
|
|
setenv = OS_TEST_PATH=./kuryr_libnetwork/tests/fullstack
|
2016-11-18 21:06:59 +08:00
|
|
|
passenv = OS_*
|
2015-12-08 08:18:44 +02:00
|
|
|
|
2016-01-18 14:26:01 +08:00
|
|
|
[testenv:debug]
|
2017-02-22 00:08:31 +08:00
|
|
|
commands = oslo_debug_helper -t kuryr_libnetwork/tests {posargs}
|
2016-01-18 14:26:01 +08:00
|
|
|
|
2015-07-14 21:25:28 +03:00
|
|
|
[testenv:pep8]
|
|
|
|
commands = flake8
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:cover]
|
2017-09-25 11:30:29 +07:00
|
|
|
setenv =
|
|
|
|
VIRTUAL_ENV={envdir}
|
|
|
|
PYTHON=coverage run --source kuryr_libnetwork --parallel-mode
|
2016-09-29 23:53:27 +08:00
|
|
|
commands =
|
2017-09-25 11:30:29 +07:00
|
|
|
stestr run {posargs}
|
|
|
|
coverage combine
|
|
|
|
coverage html -d cover
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
coverage report
|
2015-07-14 21:25:28 +03:00
|
|
|
|
|
|
|
[testenv:docs]
|
2021-01-05 22:25:15 -03:00
|
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
|
|
-r{toxinidir}/doc/requirements.txt
|
2020-04-06 14:47:35 +02:00
|
|
|
commands =
|
|
|
|
sphinx-build -a -W -E -b html doc/source doc/build/html
|
2015-07-14 21:25:28 +03:00
|
|
|
|
|
|
|
[flake8]
|
|
|
|
# E128 continuation line under-indented for visual indent
|
2020-05-15 01:23:50 +08:00
|
|
|
# W504 line break after binary operator
|
|
|
|
ignore = E128,W504
|
2015-07-14 21:25:28 +03:00
|
|
|
show-source = true
|
2015-09-17 08:09:34 +03:00
|
|
|
|
2017-01-23 09:29:53 -06:00
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,releasenotes
|
2015-07-14 21:25:28 +03:00
|
|
|
|
|
|
|
[testenv:pylint]
|
|
|
|
deps =
|
|
|
|
{[testenv]deps}
|
|
|
|
pylint
|
|
|
|
commands =
|
|
|
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
|
|
|
|
|
|
|
|
[hacking]
|
2016-11-17 14:00:59 +08:00
|
|
|
import_exceptions = kuryr.lib._i18n
|
2016-04-24 23:21:10 -05:00
|
|
|
local-check-factory = neutron_lib.hacking.checks.factory
|
2015-09-14 00:33:32 -04:00
|
|
|
|
|
|
|
[testenv:genconfig]
|
2016-12-08 14:49:07 +05:30
|
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
2017-01-23 09:29:53 -06:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
2021-01-05 22:25:15 -03:00
|
|
|
deps = {[testenv:docs]deps}
|
2017-01-23 09:29:53 -06:00
|
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|