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] [tox]
minversion = 3.18.0 minversion = 3.18.0
envlist = py38,pep8 envlist = py3,pep8
skipsdist = True #skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that # Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set # env and ignore basepython inherited from [testenv] if we set
# ignore_basepython_conflict. # ignore_basepython_conflict.
@ -10,19 +10,21 @@ ignore_basepython_conflict = True
[testenv] [testenv]
usedevelop = True usedevelop = True
basepython = python3 basepython = python3
setenv = OS_STDOUT_CAPTURE=1 setenv =
OS_STDERR_CAPTURE=1 OS_STDOUT_CAPTURE=1
OS_TEST_TIMEOUT=60 OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
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}
-r{toxinidir}/test-requirements.txt -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt -r{toxinidir}/requirements.txt
commands = stestr run {posargs} commands = stestr run {posargs}
allowlist_externals = stestr allowlist_externals = stestr
[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
setenv = VIRTUAL_ENV={envdir} setenv =
VIRTUAL_ENV={envdir}
envdir = {toxworkdir}/pep8 envdir = {toxworkdir}/pep8
commands = commands =
{toxinidir}/tools/fast8.sh {toxinidir}/tools/fast8.sh
@ -74,14 +76,18 @@ commands =
allowlist_externals = stestr allowlist_externals = stestr
[testenv:functional] [testenv:functional]
setenv = OS_TEST_PATH=./openstackclient/tests/functional setenv =
passenv = OS_* OS_TEST_PATH=./openstackclient/tests/functional
passenv =
OS_*
commands = commands =
stestr run {posargs} stestr run {posargs}
[testenv:functional-tips] [testenv:functional-tips]
setenv = OS_TEST_PATH=./openstackclient/tests/functional setenv =
passenv = OS_* OS_TEST_PATH=./openstackclient/tests/functional
passenv =
OS_*
commands = commands =
python -m pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff" 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" python -m pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth1"
@ -108,7 +114,8 @@ commands =
coverage xml -o cover/coverage.xml coverage xml -o cover/coverage.xml
[testenv:debug] [testenv:debug]
passenv = OS_* passenv =
OS_*
commands = commands =
oslo_debug_helper -t openstackclient/tests {posargs} oslo_debug_helper -t openstackclient/tests {posargs}