Adjust tox.ini for tox4

OpenStack CI now uses tox4 by default.

- Drop "skipsdist = True".
  When skipsdist=True is specified, a target application is not
  installed into a tox env, but there seems no reason to do so.
  In various other OpenStack projects, a target applicatin needs
  to be installed into a tox vnev, for example, in docs and/or
  linter jobs and it causes failures with tox4. So dropping it
  would avoid potential future failures.
- Add ignore_basepython_conflict = True to tox.ini
  With latest tox (>4.0.15) python version conflicted with base
  python. Adding ignore_basepython_conflict = True solves this
  issue.
- Replace deprecated whitelist_externals with allowlist_externals.

Change-Id: Iead95c0779f9705cf096d1ac3038a16aa62f1678
This commit is contained in:
manchandavishal 2023-01-17 15:03:59 +05:30
parent 834286c79b
commit faf9bf4514
1 changed files with 10 additions and 7 deletions

17
tox.ini
View File

@ -1,7 +1,10 @@
[tox]
envlist = py3,pep8,,py36-local,eslint,karma-local,docs-local,releasenotes,lower-constraints-local
minversion = 2.3.2
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.
ignore_basepython_conflict = True
[testenv]
basepython = python3
@ -46,7 +49,7 @@ commands =
{[testenv]commands}
[testenv:eslint]
whitelist_externals =
allowlist_externals =
npm
commands =
npm install
@ -56,15 +59,15 @@ commands =
# from master branch into py35 environment for testing javascripts.
# Horizon from master is needed to be cloned into ../horizon on both local and CI.
[testenv:karma]
whitelist_externals =
{[testenv:eslint]whitelist_externals}
allowlist_externals =
{[testenv:eslint]allowlist_externals}
commands =
npm install
npm run test
[testenv:karma-local]
whitelist_externals =
{[testenv:eslint]whitelist_externals}
allowlist_externals =
{[testenv:eslint]allowlist_externals}
commands =
{[testenv:karma]commands}
@ -92,7 +95,7 @@ commands =
sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:debug]
whitelist_externals = oslo_debug_helper
allowlist_externals = oslo_debug_helper
commands = oslo_debug_helper -t senlin_dashboard/test {posargs}
[testenv:makemessages]