Use tox 4
Changes: - eliminate whitespace in passenv values - removed skipsdist=True, which in tox 4 appears to prevent os-brick from being installed in the testenvs - made 4.4.1 the tox minversion to catch relevant bugfixes; since tox is not constrained, we'll actually be using the most recent version of tox 4 - had to adjust the functional testenv's setenv, which wasn't overriding OS_TEST_PATH like it did with tox 3 - used generative section names to define the various functional py3 testenvs we want to support locally (namely, py38, py39, py310, and py311) This patch makes tox 4 the default so that we can hopefully catch problems locally before they block the gate. Change-Id: I01c4d44efa64650cdb46fac34a770a7aa5881baf
This commit is contained in:
27
tox.ini
27
tox.ini
@@ -1,9 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
distribute = False
|
distribute = False
|
||||||
envlist = py3,pep8
|
envlist = py3,pep8
|
||||||
minversion = 3.18.0
|
minversion = 4.4.1
|
||||||
requires = tox<4
|
# specify virtualenv here to keep local runs consistent with the
|
||||||
skipsdist = True
|
# gate (it sets the versions of pip, setuptools, and wheel)
|
||||||
|
requires = virtualenv>=20.17.1
|
||||||
# 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
|
||||||
@@ -17,7 +18,9 @@ setenv =
|
|||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
OS_TEST_TIMEOUT=60
|
OS_TEST_TIMEOUT=60
|
||||||
passenv = *_proxy *_PROXY
|
passenv =
|
||||||
|
*_proxy
|
||||||
|
*_PROXY
|
||||||
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
@@ -83,7 +86,12 @@ deps =
|
|||||||
tempest>=26.0.0
|
tempest>=26.0.0
|
||||||
commands = stestr run {posargs}
|
commands = stestr run {posargs}
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
# can't use {[testenv]setenv} here due to tox 4 issue
|
||||||
|
# https://github.com/tox-dev/tox/issues/2831
|
||||||
|
VIRTUAL_ENV={envdir}
|
||||||
|
OS_STDOUT_CAPTURE=1
|
||||||
|
OS_STDERR_CAPTURE=1
|
||||||
|
OS_TEST_TIMEOUT=60
|
||||||
OS_TEST_PATH=./cinderclient/tests/functional
|
OS_TEST_PATH=./cinderclient/tests/functional
|
||||||
OS_VOLUME_API_VERSION = 3
|
OS_VOLUME_API_VERSION = 3
|
||||||
# must define this here so it can be inherited by the -py3* environments
|
# must define this here so it can be inherited by the -py3* environments
|
||||||
@@ -99,13 +107,7 @@ setenv =
|
|||||||
# TLS (https) server certificate.
|
# TLS (https) server certificate.
|
||||||
passenv = OS_*
|
passenv = OS_*
|
||||||
|
|
||||||
[testenv:functional-py38]
|
[testenv:functional-py{3,38,39,310,311}]
|
||||||
deps = {[testenv:functional]deps}
|
|
||||||
setenv = {[testenv:functional]setenv}
|
|
||||||
passenv = {[testenv:functional]passenv}
|
|
||||||
commands = {[testenv:functional]commands}
|
|
||||||
|
|
||||||
[testenv:functional-py39]
|
|
||||||
deps = {[testenv:functional]deps}
|
deps = {[testenv:functional]deps}
|
||||||
setenv = {[testenv:functional]setenv}
|
setenv = {[testenv:functional]setenv}
|
||||||
passenv = {[testenv:functional]passenv}
|
passenv = {[testenv:functional]passenv}
|
||||||
@@ -121,4 +123,3 @@ import-order-style = pep8
|
|||||||
[doc8]
|
[doc8]
|
||||||
ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/source/configuration/tables,./*.txt,releasenotes/build,doc/source/cli/details.rst
|
ignore-path=.tox,*.egg-info,doc/src/api,doc/source/drivers.rst,doc/build,.eggs/*/EGG-INFO/*.txt,doc/source/configuration/tables,./*.txt,releasenotes/build,doc/source/cli/details.rst
|
||||||
extension=.txt,.rst,.inc
|
extension=.txt,.rst,.inc
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user