7fce4cd925
tox.ini started failing with Tox4 which had some incompatible changes. Fixing tox.ini for tox4 changes. The latest version of docker broke kuryr-libnetwork since it removes external k/v support. We have to hardcode to an older version of docker to workaround. The CI failed to delete subnetpool since the subnet haven't been deleted yet. This commit also fixed it. Depends-On: https://review.opendev.org/c/openstack/devstack-plugin-container/+/875113 Change-Id: Id48bb7d92f2f5d9d08b44acf651dbba3bf2e924e
77 lines
2.1 KiB
INI
77 lines
2.1 KiB
INI
[tox]
|
|
minversion = 2.3.1
|
|
envlist = py38,pep8
|
|
|
|
[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
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
allowlist_externals = sh
|
|
find
|
|
commands = find . -type f -name "*.py[c|o]" -delete
|
|
stestr run {posargs}
|
|
|
|
[testenv:fullstack]
|
|
setenv = OS_TEST_PATH=./kuryr_libnetwork/tests/fullstack
|
|
passenv = OS_*
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper -t kuryr_libnetwork/tests {posargs}
|
|
|
|
[testenv:pep8]
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHON=coverage run --source kuryr_libnetwork --parallel-mode
|
|
commands =
|
|
stestr run {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:docs]
|
|
deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -a -W -E -b html doc/source doc/build/html
|
|
|
|
[flake8]
|
|
# E128 continuation line under-indented for visual indent
|
|
# W504 line break after binary operator
|
|
ignore = E128,W504
|
|
show-source = true
|
|
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,releasenotes
|
|
|
|
[testenv:pylint]
|
|
deps =
|
|
{[testenv]deps}
|
|
pylint
|
|
commands =
|
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
|
|
|
|
[hacking]
|
|
import_exceptions = kuryr.lib._i18n
|
|
local-check-factory = neutron_lib.hacking.checks.factory
|
|
|
|
[testenv:genconfig]
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands = sphinx-build -a -W -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|