diff options
author | Brian Rosmaita <rosmaita.fossdev@gmail.com> | 2023-02-15 20:18:38 -0500 |
---|---|---|
committer | Brian Rosmaita <rosmaita.fossdev@gmail.com> | 2023-04-17 18:28:01 -0400 |
commit | 1260de9e61ea276c8f67c39437286b11fcb136fc (patch) | |
tree | c56e16c926a752beba7364b67301f941dfb15c43 | |
parent | a75c5bfbc4f38915d8e731a806c53d1500e8e09e (diff) | |
download | python-cinderclient-1260de9e61ea276c8f67c39437286b11fcb136fc.tar.gz |
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
-rw-r--r-- | tox.ini | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -1,9 +1,10 @@ [tox] distribute = False envlist = py3,pep8 -minversion = 3.18.0 -requires = tox<4 -skipsdist = True +minversion = 4.4.1 +# specify virtualenv here to keep local runs consistent with the +# 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 # and override any basepython configured in this file ignore_basepython_conflict=true @@ -17,7 +18,9 @@ setenv = OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 -passenv = *_proxy *_PROXY +passenv = + *_proxy + *_PROXY deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} @@ -83,8 +86,13 @@ deps = tempest>=26.0.0 commands = stestr run {posargs} setenv = - {[testenv]setenv} - OS_TEST_PATH = ./cinderclient/tests/functional + # 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_VOLUME_API_VERSION = 3 # must define this here so it can be inherited by the -py3* environments OS_CINDERCLIENT_EXEC_DIR = {envdir}/bin @@ -99,13 +107,7 @@ setenv = # TLS (https) server certificate. passenv = OS_* -[testenv:functional-py38] -deps = {[testenv:functional]deps} -setenv = {[testenv:functional]setenv} -passenv = {[testenv:functional]passenv} -commands = {[testenv:functional]commands} - -[testenv:functional-py39] +[testenv:functional-py{3,38,39,310,311}] deps = {[testenv:functional]deps} setenv = {[testenv:functional]setenv} passenv = {[testenv:functional]passenv} @@ -121,4 +123,3 @@ import-order-style = pep8 [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 extension=.txt,.rst,.inc - |