[tox] minversion = 2.0 envlist = py35,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] 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] 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] # B108 hardcoded_tmp_directory - remove when fixed # B109 password_config_option_not_marked_secret # 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 -n 5 -s B108,B109,B602,B605 -ll