Make tox.ini tox 4.0.0 compatible
* removed skipsdist=True to make sure placement available in the virtual env * passenv fixed as space separated list is not allowed any more * improved the doc generation command line to print all the errors instead of stopping at the first one * added functional-py310 for convenience * removed basepython = python3 as we assume all developer switched to python3 in their env already * removed ignore_basepython_conflict = True as without the basepython definition generative targets now work without conflict * updated the install_command to mimic better what tox uses by default Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/866943 Change-Id: I1de24b7a98f149fce33d4e5eca82460eea72140b
This commit is contained in:
parent
bacd2c0393
commit
1c8afcd3f1
22
tox.ini
22
tox.ini
|
@ -1,20 +1,14 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 3.18.0
|
minversion = 3.18.0
|
||||||
envlist = py39,functional-py39,pep8
|
envlist = py39,functional-py39,pep8
|
||||||
skipsdist = True
|
|
||||||
# Automatic envs (pyXX) will use the python version appropriate to that
|
|
||||||
# env and ignore basepython inherited from [testenv]. That's what we
|
|
||||||
# want, and we don't need to be warned about it.
|
|
||||||
ignore_basepython_conflict = True
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
bash
|
bash
|
||||||
rm
|
rm
|
||||||
env
|
env
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
install_command = python -I -m pip install -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages}
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
LANGUAGE=en_US
|
LANGUAGE=en_US
|
||||||
|
@ -30,7 +24,8 @@ deps = -r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
passenv =
|
passenv =
|
||||||
OS_DEBUG GENERATE_HASHES
|
OS_DEBUG
|
||||||
|
GENERATE_HASHES
|
||||||
# there is also secret magic in subunit-trace which lets you run in a fail only
|
# there is also secret magic in subunit-trace which lets you run in a fail only
|
||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
||||||
|
|
||||||
|
@ -49,6 +44,11 @@ envdir = {toxworkdir}/py39
|
||||||
commands =
|
commands =
|
||||||
{[testenv:functional]commands}
|
{[testenv:functional]commands}
|
||||||
|
|
||||||
|
[testenv:functional-py310]
|
||||||
|
envdir = {toxworkdir}/py310
|
||||||
|
commands =
|
||||||
|
{[testenv:functional]commands}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
description =
|
description =
|
||||||
Run style checks.
|
Run style checks.
|
||||||
|
@ -109,7 +109,7 @@ description =
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
sphinx-build -W --keep-going -b html -j auto doc/source doc/build/html
|
||||||
# Test the redirects
|
# Test the redirects
|
||||||
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
|
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
|
||||||
|
|
||||||
|
@ -163,9 +163,9 @@ max-complexity=19
|
||||||
# system dependencies are missing, since it's used to tell you what system
|
# system dependencies are missing, since it's used to tell you what system
|
||||||
# dependencies are missing! This also means that bindep must be installed
|
# dependencies are missing! This also means that bindep must be installed
|
||||||
# separately, outside of the requirements files, and develop mode disabled
|
# separately, outside of the requirements files, and develop mode disabled
|
||||||
# explicitly to avoid unnecessarily installing the checked-out repo too (this
|
# explicitly to avoid unnecessarily installing the checked-out repo too
|
||||||
# further relies on "tox.skipsdist = True" above).
|
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
|
skipsdist = True
|
||||||
deps = bindep
|
deps = bindep
|
||||||
commands =
|
commands =
|
||||||
bindep test
|
bindep test
|
||||||
|
|
Loading…
Reference in New Issue