Get ready for tox 4

Changes:
- eliminate whitespace in passenv values
- account for stricter allowlist checking
- removed skipsdist=True, which in tox 4 appears to prevent
  rbd-iscsi-client from being installed in the testenvs
- updated the 'bindep' testenv so it would work if we had
  a bindep.txt, which we currently don't

We can't make tox 4 the default because tox 4 only supports python
>=3.7, and rbd-iscsi-client still supports py3.6.  When our CI job
for py3.6 lands on a system whose default python is 3.6, the job
would fail because it couldn't install tox 4.

Change-Id: I651f762bf6aac9679d1fd74817e7e5f201ced774
This commit is contained in:
Brian Rosmaita 2022-12-21 09:18:06 -05:00
parent 8fe7c8a5d3
commit 3f7eff31e1

20
tox.ini
View File

@ -1,9 +1,9 @@
[tox] [tox]
minversion = 3.18.0 minversion = 3.18.0
requires = virtualenv>=20.4.2 # specify virtualenv here to keep local runs consistent with the
# python runtimes: https://governance.openstack.org/tc/reference/project-testing-interface.html#tested-runtimes # gate (it sets the versions of pip, setuptools, and wheel)
requires = virtualenv>=20.17.1
envlist = py3,pep8 envlist = py3,pep8
skipsdist = True
# this allows tox to infer the base python from the environment name # this allows tox to infer the base python from the environment name
# and override any basepython configured in this file # and override any basepython configured in this file
ignore_basepython_conflict=true ignore_basepython_conflict=true
@ -30,7 +30,13 @@ commands =
allowlist_externals = bash allowlist_externals = bash
find find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY passenv =
http_proxy
HTTP_PROXY
https_proxy
HTTPS_PROXY
no_proxy
NO_PROXY
[testenv:py36] [testenv:py36]
# We have to override the tox default py36 testenv because we need to use # We have to override the tox default py36 testenv because we need to use
@ -51,6 +57,8 @@ commands =
[testenv:fast8] [testenv:fast8]
# Use same environment directory as pep8 env to save space and install time # Use same environment directory as pep8 env to save space and install time
envdir = {toxworkdir}/pep8 envdir = {toxworkdir}/pep8
allowlist_externals =
{toxinidir}/tools/fast8.sh
commands = commands =
{toxinidir}/tools/fast8.sh {toxinidir}/tools/fast8.sh
@ -135,8 +143,8 @@ import_exceptions = rbd_iscsi_client.i18n
# system dependencies are missing, since it's used to tell you what system # system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed # dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files, and develop mode disabled # separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this # explicitly to avoid unnecessarily installing the checked-out repo too
# further relies on "tox.skipsdist = True" above). skip_install = True
deps = bindep deps = bindep
commands = bindep test commands = bindep test
usedevelop = False usedevelop = False