
This patch updates hacking and bandit versions to match what neutron and others are doing. It also fixes and ignores some new pep8 errors that crop up due to the version bump. Finally the doc requirements are moved to doc/requirements.txt to match what other projects do, even though this project does not build docs today. Change-Id: Ibe07dbdbaccc220b5ea2a628d342a09a01b09d11
117 lines
3.2 KiB
INI
117 lines
3.2 KiB
INI
[tox]
|
|
envlist = py36,py27,pep8,docs
|
|
minversion = 2.0
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
install_command = pip install {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|
usedevelop = True
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals = sh
|
|
commands =
|
|
stestr run {posargs}
|
|
stestr slowest
|
|
# there is also secret magic in ostestr which lets you run in a fail only
|
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
|
|
|
[testenv:common]
|
|
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
|
setenv = {[testenv]setenv}
|
|
OS_TEST_TIMEOUT=180
|
|
commands = false
|
|
|
|
[testenv:functional]
|
|
basepython = python3
|
|
setenv = {[testenv]setenv}
|
|
{[testenv:common]setenv}
|
|
OS_TEST_PATH=./vmware_nsxlib/tests/functional
|
|
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
|
|
deps =
|
|
{[testenv]deps}
|
|
-r{toxinidir}/vmware_nsxlib/tests/functional/requirements.txt
|
|
|
|
[testenv:dsvm-functional]
|
|
basepython = python3
|
|
setenv = {[testenv]setenv}
|
|
OS_SUDO_TESTING=1
|
|
OS_FAIL_ON_MISSING_DEPS=1
|
|
OS_TEST_TIMEOUT=180
|
|
sitepackages=True
|
|
deps =
|
|
{[testenv:functional]deps}
|
|
commands =
|
|
|
|
[tox:jenkins]
|
|
sitepackages = True
|
|
|
|
[testenv:releasenotes]
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
deps =
|
|
{[testenv]deps}
|
|
commands =
|
|
# Checks for coding and style guidelines
|
|
flake8
|
|
{[testenv:genconfig]commands}
|
|
whitelist_externals =
|
|
sh
|
|
bash
|
|
|
|
[testenv:bandit]
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = bandit -r vmware_nsxlib -n 5 -ll
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
commands =
|
|
python setup.py test --coverage --coverage-package-name=vmware_nsxlib --testr-args='{posargs}'
|
|
coverage report
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -b html doc/source doc/build/html
|
|
|
|
[flake8]
|
|
# E125 continuation line does not distinguish itself from next logical line
|
|
# E129 visually indented line with same indent as next logical line
|
|
# E741 ambiguous variable name
|
|
# N530 direct neutron imports not allowed
|
|
# W504 line break after binary operator
|
|
# N531 translations hints
|
|
ignore = N530,E125,E129,E741,N531,W504
|
|
show-source = true
|
|
builtins = _
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,.ropeproject
|
|
import-order-style = pep8
|
|
|
|
[hacking]
|
|
import_exceptions = vmware_nsxlib._i18n
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
|
|
[testenv:uuidgen]
|
|
commands =
|
|
check-uuid --fix
|
|
|
|
[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
|