vmware-nsx-tempest-plugin/tox.ini
Boden R 338c877f17 move zuul config to repo
Currently this project has a number of generic templates defined in
it's job definition for project-config. These templates should be
defined at the project level; not global. This patch moves the
templates to the .zuul.yaml of this project.

Also see https://review.openstack.org/#/c/652680/

Change-Id: I263ff53a5acfe6e626fce43177fa87badfcd2d8f
2019-04-22 08:22:39 -06:00

104 lines
2.8 KiB
INI

[tox]
minversion = 2.0
envlist = py36,py27,pep8,docs
skipsdist = True
[testenv]
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
whitelist_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:py27]
setenv = OS_FAIL_ON_MISSING_DEPS=1
[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
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
# 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 -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