tox: Drop envdir

tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: Ibbb4ab56ca84f5a8f9fe309a46469d49ff4ef9f7
This commit is contained in:
Takashi Kajinami 2024-02-03 00:02:41 +09:00
parent b85b19e384
commit 94ea289600
1 changed files with 0 additions and 11 deletions

11
tox.ini
View File

@ -36,7 +36,6 @@ commands =
# mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:debug]
envdir = {toxworkdir}/shared
commands = oslo_debug_helper -t neutron/tests {posargs}
[testenv:common]
@ -109,12 +108,10 @@ commands =
stestr run --slowest --combine --concurrency 1 neutron.tests.fullstack.test_securitygroup.TestSecurityGroupsSameNetwork.test_securitygroup {posargs}
[testenv:releasenotes]
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]
envdir = {toxworkdir}/lint
deps =
{[testenv]deps}
bashate>=2.1.1 # Apache-2.0
@ -136,7 +133,6 @@ commands=
allowlist_externals = bash
[testenv:cover]
envdir = {toxworkdir}/shared
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron --parallel-mode
@ -151,7 +147,6 @@ commands =
commands = {posargs}
[testenv:docs]
envdir = {toxworkdir}/docs
# Do not remove requirements.txt from deps list as without it
# upper constraints will not be used for deps listed in requirements.txt
# and may cause issues
@ -162,7 +157,6 @@ deps =
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps}
allowlist_externals =
make
@ -171,7 +165,6 @@ commands =
make -C doc/build/pdf
[testenv:linkcheck]
envdir = {toxworkdir}/docs
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
@ -226,7 +219,6 @@ extension =
import_exceptions = neutron._i18n
[testenv:bandit]
envdir = {toxworkdir}/lint
deps = {[testenv:pep8]deps}
# B104: Possible binding to all interfaces
# B303: prohibit list calls: md5, sha1 for python<3.9
@ -236,7 +228,6 @@ deps = {[testenv:pep8]deps}
commands = bandit -r neutron -x tests -n5 -s B104,B303,B311,B324,B604
[testenv:bashate]
envdir = {toxworkdir}/lint
deps = {[testenv:pep8]deps}
commands = bash -c "find {toxinidir} \
-not \( -type d -name .tox\* -prune \) \
@ -250,11 +241,9 @@ commands = bash -c "find {toxinidir} \
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
[testenv:genconfig]
envdir = {toxworkdir}/shared
commands = bash {toxinidir}/tools/generate_config_file_samples.sh
[testenv:genpolicy]
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