|
|
|
@ -1,9 +1,10 @@
|
|
|
|
|
[tox]
|
|
|
|
|
envlist = docs,py27,py37,pep8
|
|
|
|
|
envlist = docs,py37,pep8
|
|
|
|
|
minversion = 2.3.2
|
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
|
|
|
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
|
|
|
@ -26,18 +27,15 @@ commands =
|
|
|
|
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
|
|
|
|
|
|
|
|
|
[testenv:debug]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
commands = oslo_debug_helper -t neutron/tests {posargs}
|
|
|
|
|
|
|
|
|
|
[testenv:common]
|
|
|
|
|
basepython = python3
|
|
|
|
|
# Fake job to define environment variables shared between dsvm/non-dsvm jobs
|
|
|
|
|
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}
|
|
|
|
|
commands = false
|
|
|
|
|
|
|
|
|
|
[testenv:dsvm]
|
|
|
|
|
basepython = python3
|
|
|
|
|
# Fake job to define environment variables shared between dsvm jobs
|
|
|
|
|
setenv = OS_SUDO_TESTING=1
|
|
|
|
|
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
|
|
|
|
@ -47,7 +45,6 @@ setenv = OS_SUDO_TESTING=1
|
|
|
|
|
commands = false
|
|
|
|
|
|
|
|
|
|
[testenv:functional]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
|
{[testenv:common]setenv}
|
|
|
|
|
OS_TEST_PATH=./neutron/tests/functional
|
|
|
|
@ -59,14 +56,7 @@ deps =
|
|
|
|
|
{[testenv]deps}
|
|
|
|
|
-r{toxinidir}/neutron/tests/functional/requirements.txt
|
|
|
|
|
|
|
|
|
|
[testenv:functional-python27]
|
|
|
|
|
basepython = python2.7
|
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:functional]deps}
|
|
|
|
|
|
|
|
|
|
[testenv:dsvm-functional]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv = {[testenv:functional]setenv}
|
|
|
|
|
{[testenv:dsvm]setenv}
|
|
|
|
|
deps =
|
|
|
|
@ -75,16 +65,7 @@ commands =
|
|
|
|
|
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
|
|
|
|
|
[testenv:dsvm-functional-python27]
|
|
|
|
|
basepython = python2.7
|
|
|
|
|
setenv = {[testenv:dsvm-functional]setenv}
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv:dsvm-functional]deps}
|
|
|
|
|
commands =
|
|
|
|
|
{[testenv:dsvm-functional]commands}
|
|
|
|
|
|
|
|
|
|
[testenv:dsvm-fullstack]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv = {[testenv]setenv}
|
|
|
|
|
{[testenv:common]setenv}
|
|
|
|
|
{[testenv:dsvm]setenv}
|
|
|
|
@ -99,13 +80,11 @@ commands =
|
|
|
|
|
stestr run --concurrency 4 {posargs}
|
|
|
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/docs
|
|
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
deps =
|
|
|
|
|
{[testenv]deps}
|
|
|
|
@ -127,7 +106,6 @@ whitelist_externals =
|
|
|
|
|
bash
|
|
|
|
|
|
|
|
|
|
[testenv:cover]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
setenv =
|
|
|
|
|
{[testenv]setenv}
|
|
|
|
@ -140,17 +118,14 @@ commands =
|
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
|
basepython = python3
|
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/docs
|
|
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
|
|
|
|
|
|
[testenv:pdf-docs]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/docs
|
|
|
|
|
deps = {[testenv:docs]deps}
|
|
|
|
|
whitelist_externals =
|
|
|
|
@ -160,7 +135,6 @@ commands =
|
|
|
|
|
make -C doc/build/pdf
|
|
|
|
|
|
|
|
|
|
[testenv:linkcheck]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/docs
|
|
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
|
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
|
|
|
@ -189,7 +163,6 @@ import_exceptions = neutron._i18n
|
|
|
|
|
local-check-factory = neutron.hacking.checks.factory
|
|
|
|
|
|
|
|
|
|
[testenv:bandit]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
# B104: Possible binding to all interfaces
|
|
|
|
|
# B303: blacklist calls: md5, sha1
|
|
|
|
@ -199,7 +172,6 @@ deps = -r{toxinidir}/test-requirements.txt
|
|
|
|
|
commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B604
|
|
|
|
|
|
|
|
|
|
[testenv:bashate]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
commands = bash -c "find {toxinidir} \
|
|
|
|
|
-not \( -type d -name .tox\* -prune \) \
|
|
|
|
@ -213,19 +185,16 @@ commands = bash -c "find {toxinidir} \
|
|
|
|
|
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
|
|
|
|
|
|
|
|
|
|
[testenv:genconfig]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
|
|
|
|
|
|
|
|
|
[testenv:genpolicy]
|
|
|
|
|
basepython = python3
|
|
|
|
|
envdir = {toxworkdir}/shared
|
|
|
|
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
|
|
|
|
|
|
|
|
|
|
# This environment can be used to quickly validate that all needed system
|
|
|
|
|
# packages required to successfully execute test targets are installed
|
|
|
|
|
[testenv:bindep]
|
|
|
|
|
basepython = python3
|
|
|
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
|
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
|
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
|
|
@ -234,7 +203,6 @@ deps = bindep
|
|
|
|
|
commands = bindep test
|
|
|
|
|
|
|
|
|
|
[testenv:lower-constraints]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
|
|
|
|
|
deps =
|
|
|
|
|
-c{toxinidir}/lower-constraints.txt
|
|
|
|
|