From 5501ac7d1dc9bef97840fea98c55c86bcb10792f Mon Sep 17 00:00:00 2001 From: "Dr. Jens Harbott" Date: Thu, 22 Dec 2022 20:45:20 +0100 Subject: [PATCH] Fix tox v4 compatibility Various changes to tox.ini to support v4 Change-Id: Iee2bceb78f5b03c559f23b99cde57fd598ce981a --- tox.ini | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/tox.ini b/tox.ini index 5f02e7c21c..3de7dd3804 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.18.0 -envlist = py38,pep8 -skipsdist = True +envlist = py3,pep8 +#skipsdist = True # Automatic envs (pyXX) will only use the python version appropriate to that # env and ignore basepython inherited from [testenv] if we set # ignore_basepython_conflict. @@ -10,19 +10,21 @@ ignore_basepython_conflict = True [testenv] usedevelop = True basepython = python3 -setenv = OS_STDOUT_CAPTURE=1 - OS_STDERR_CAPTURE=1 - OS_TEST_TIMEOUT=60 +setenv = + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} - -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/test-requirements.txt + -r{toxinidir}/requirements.txt commands = stestr run {posargs} allowlist_externals = stestr [testenv:fast8] # Use same environment directory as pep8 env to save space and install time -setenv = VIRTUAL_ENV={envdir} +setenv = + VIRTUAL_ENV={envdir} envdir = {toxworkdir}/pep8 commands = {toxinidir}/tools/fast8.sh @@ -74,14 +76,18 @@ commands = allowlist_externals = stestr [testenv:functional] -setenv = OS_TEST_PATH=./openstackclient/tests/functional -passenv = OS_* +setenv = + OS_TEST_PATH=./openstackclient/tests/functional +passenv = + OS_* commands = stestr run {posargs} [testenv:functional-tips] -setenv = OS_TEST_PATH=./openstackclient/tests/functional -passenv = OS_* +setenv = + OS_TEST_PATH=./openstackclient/tests/functional +passenv = + OS_* commands = python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff" python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth1" @@ -108,7 +114,8 @@ commands = coverage xml -o cover/coverage.xml [testenv:debug] -passenv = OS_* +passenv = + OS_* commands = oslo_debug_helper -t openstackclient/tests {posargs}