Fix tox v4 compatibility

Various changes to tox.ini to support v4

Change-Id: Iee2bceb78f5b03c559f23b99cde57fd598ce981a
This commit is contained in:
Dr. Jens Harbott 2022-12-22 20:45:20 +01:00 committed by Artem Goncharov
parent 1c2191bf3a
commit 5501ac7d1d

35
tox.ini
View File

@ -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}