tox: Ensure reused envdirs share the same deps
In commit df669caf
, we modified tox.ini to reuse a shared directory for
environments with the same dependencies. The 'venv' directory was
chosen as this seemed like a suitably generic target. However, the
'venv' target actually uses a non-default values for 'deps' as doc
requirements are included to allow things like reno using this target.
This means switching between the 'venv' target and any of the other
other targets using this directory will result in the virtualenv being
rebuilt each time.
Resolve this by using an explicit directory for these shared
environments. A single setting of 'deps' for one of the targets is
removed to make this clear.
Change-Id: I239606f5f354a5536b20b1d31ee81d80b4572106
This commit is contained in:
parent
ec061aad2f
commit
a0614472df
19
tox.ini
19
tox.ini
@ -55,8 +55,7 @@ commands =
|
||||
[testenv:pep8]
|
||||
description =
|
||||
Run style checks.
|
||||
deps = {[testenv]deps}
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
bash tools/flake8wrap.sh {posargs}
|
||||
# Check that all JSON files don't have \r\n in line.
|
||||
@ -67,7 +66,7 @@ commands =
|
||||
[testenv:fast8]
|
||||
description =
|
||||
Run style checks on the changes made since HEAD~. For a full run including docs, use 'pep8'
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
bash tools/flake8wrap.sh -HEAD
|
||||
|
||||
@ -100,7 +99,7 @@ commands =
|
||||
{[testenv:functional]commands}
|
||||
|
||||
[testenv:api-samples]
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
GENERATE_SAMPLES=True
|
||||
@ -111,17 +110,17 @@ commands =
|
||||
stestr slowest
|
||||
|
||||
[testenv:genconfig]
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
|
||||
|
||||
[testenv:genpolicy]
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
|
||||
|
||||
[testenv:genplacementpolicy]
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
oslopolicy-sample-generator --config-file=etc/nova/placement-policy-generator.conf
|
||||
|
||||
@ -130,7 +129,7 @@ commands =
|
||||
# section once we rely on coverage 4.3+
|
||||
#
|
||||
# https://bitbucket.org/ned/coveragepy/issues/519/
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source nova --parallel-mode
|
||||
@ -144,7 +143,7 @@ commands =
|
||||
coverage report
|
||||
|
||||
[testenv:debug]
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
oslo_debug_helper {posargs}
|
||||
@ -213,7 +212,7 @@ commands =
|
||||
[testenv:bandit]
|
||||
# NOTE(browne): This is required for the integration test job of the bandit
|
||||
# project. Please do not remove.
|
||||
envdir = {toxworkdir}/venv
|
||||
envdir = {toxworkdir}/shared
|
||||
commands = bandit -r nova -x tests -n 5 -ll
|
||||
|
||||
[flake8]
|
||||
|
Loading…
Reference in New Issue
Block a user