60f9c54df7
- Skip bandit error B113 - Fix some style errors - Adjust requirements - Stop running python27 jobs - Remove unit test jobs as on zuul tempest plugins are not loaded Change-Id: I14fa84dfe8ed8f30f7bc4e2432b92c1b6387eb3e
104 lines
2.8 KiB
INI
104 lines
2.8 KiB
INI
[tox]
|
|
minversion = 3.1
|
|
envlist = py39,pep8,docs
|
|
skipsdist = True
|
|
|
|
|
|
[testenv]
|
|
basepython = python3.9
|
|
usedevelop = True
|
|
install_command = pip install {opts} {packages}
|
|
setenv =
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
|
deps =
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
allowlist_externals = sh
|
|
rm
|
|
find
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run --slowest {posargs}
|
|
passenv = http_proxy
|
|
HTTP_PROXY
|
|
https_proxy
|
|
HTTPS_PROXY
|
|
no_proxy
|
|
NO_PROXY
|
|
OS_DEBUG
|
|
OS_LOG_CAPTURE
|
|
OS_STDERR_CAPTURE
|
|
OS_STDOUT_CAPTURE
|
|
TRACE_FAILONLY
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
flake8
|
|
{[testenv:bandit]commands}
|
|
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
{[testenv]setenv}
|
|
PYTHON=coverage run --source vmware_nsx_tempest --parallel-mode
|
|
commands =
|
|
stestr run --no-subunit-trace {posargs}
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
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
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
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 -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
|
|
show-source = True
|
|
ignore = E125,E126,E128,E129,E265,H305,H307,H404,H405,H904,N530,N531,W504
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject
|
|
import-order-style = pep8
|
|
|
|
[testenv:bandit]
|
|
basepython = python3
|
|
# B108 hardcoded_tmp_directory - remove when fixed
|
|
# B113 request_without_timeout
|
|
# B602 subprocess_popen_with_shell_equals_true - removed when fixed
|
|
# B605 start_process_with_a_shell - remove when fixed
|
|
commands = bandit -r vmware_nsx_tempest_plugin -n 5 -s B108,B602,B605,B113 -ll
|
|
|
|
[testenv:lower-constraints]
|
|
basepython = python3
|
|
deps =
|
|
-c{toxinidir}/lower-constraints.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
-r{toxinidir}/requirements.txt
|