tox: Reuse envdirs
This massively reduces the amount of time needed to install dependencies and saves a lot of disk space to boot. Modeled on Nova change, https://review.openstack.org/#/c/534382/ Change-Id: Icae3b6b2b0d014aec17b04b3b516b13b2fa47c5d
This commit is contained in:
parent
dd14501c12
commit
26a4b3eac0
9
tox.ini
9
tox.ini
|
@ -24,6 +24,7 @@ commands = stestr run {posargs}
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
commands = oslo_debug_helper -t neutron/tests {posargs}
|
commands = oslo_debug_helper -t neutron/tests {posargs}
|
||||||
|
|
||||||
[testenv:common]
|
[testenv:common]
|
||||||
|
@ -94,11 +95,13 @@ commands =
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
deps =
|
deps =
|
||||||
{[testenv]deps}
|
{[testenv]deps}
|
||||||
commands=
|
commands=
|
||||||
|
@ -119,6 +122,7 @@ whitelist_externals =
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
PYTHON=coverage run --source neutron --parallel-mode
|
PYTHON=coverage run --source neutron --parallel-mode
|
||||||
|
@ -135,11 +139,13 @@ commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -W -b html doc/source doc/build/html
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:linkcheck]
|
[testenv:linkcheck]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/docs
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
|
||||||
|
|
||||||
|
@ -169,6 +175,7 @@ local-check-factory = neutron.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
# B104: Possible binding to all interfaces
|
# B104: Possible binding to all interfaces
|
||||||
# B303: blacklist calls: md5, sha1
|
# B303: blacklist calls: md5, sha1
|
||||||
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
|
# B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
|
||||||
|
@ -178,6 +185,7 @@ commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B604
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
commands = bash -c "find {toxinidir} \
|
commands = bash -c "find {toxinidir} \
|
||||||
-not \( -type d -name .tox\* -prune \) \
|
-not \( -type d -name .tox\* -prune \) \
|
||||||
-not \( -type d -name .venv\* -prune \) \
|
-not \( -type d -name .venv\* -prune \) \
|
||||||
|
@ -191,6 +199,7 @@ commands = bash -c "find {toxinidir} \
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
envdir = {toxworkdir}/shared
|
||||||
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
commands = {toxinidir}/tools/generate_config_file_samples.sh
|
||||||
|
|
||||||
# This environment can be used to quickly validate that all needed system
|
# This environment can be used to quickly validate that all needed system
|
||||||
|
|
Loading…
Reference in New Issue