Browse Source

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
changes/76/582376/8
Brian Haley 3 years ago
parent
commit
26a4b3eac0
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      tox.ini

+ 9
- 0
tox.ini View File

@ -24,6 +24,7 @@ commands = stestr run {posargs}
[testenv:debug]
basepython = python3
envdir = {toxworkdir}/shared
commands = oslo_debug_helper -t neutron/tests {posargs}
[testenv:common]
@ -94,11 +95,13 @@ commands =
[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}
commands=
@ -119,6 +122,7 @@ whitelist_externals =
[testenv:cover]
basepython = python3
envdir = {toxworkdir}/shared
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron --parallel-mode
@ -135,11 +139,13 @@ 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:linkcheck]
basepython = python3
envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
@ -169,6 +175,7 @@ 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
# 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]
basepython = python3
envdir = {toxworkdir}/shared
commands = bash -c "find {toxinidir} \
-not \( -type d -name .tox\* -prune \) \
-not \( -type d -name .venv\* -prune \) \
@ -191,6 +199,7 @@ commands = bash -c "find {toxinidir} \
[testenv:genconfig]
basepython = python3
envdir = {toxworkdir}/shared
commands = {toxinidir}/tools/generate_config_file_samples.sh
# This environment can be used to quickly validate that all needed system


Loading…
Cancel
Save