From 1c8afcd3f10a2ace8fdbada4f758b27bb2774cec Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Thu, 22 Dec 2022 15:46:04 +0100 Subject: [PATCH] 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 --- tox.ini | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tox.ini b/tox.ini index 284a68f55..d70e0ac98 100644 --- a/tox.ini +++ b/tox.ini @@ -1,20 +1,14 @@ [tox] minversion = 3.18.0 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] -basepython = python3 usedevelop = True allowlist_externals = bash rm 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 = VIRTUAL_ENV={envdir} LANGUAGE=en_US @@ -30,7 +24,8 @@ deps = -r{toxinidir}/test-requirements.txt commands = stestr run {posargs} 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 # mode. To do this define the TRACE_FAILONLY environmental variable. @@ -49,6 +44,11 @@ envdir = {toxworkdir}/py39 commands = {[testenv:functional]commands} +[testenv:functional-py310] +envdir = {toxworkdir}/py310 +commands = + {[testenv:functional]commands} + [testenv:pep8] description = Run style checks. @@ -109,7 +109,7 @@ description = deps = -r{toxinidir}/doc/requirements.txt commands = 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 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 # dependencies are missing! This also means that bindep must be installed # separately, outside of the requirements files, and develop mode disabled -# explicitly to avoid unnecessarily installing the checked-out repo too (this -# further relies on "tox.skipsdist = True" above). +# explicitly to avoid unnecessarily installing the checked-out repo too usedevelop = False +skipsdist = True deps = bindep commands = bindep test