From 9f77a846b5e220abef17e99027ae283325967014 Mon Sep 17 00:00:00 2001 From: Fernando Royo Date: Fri, 23 Dec 2022 09:57:28 +0100 Subject: [PATCH] Fix jobs after tox4 upgrade Following the recommendations provided in [1], this patch disables the "skipsdist" flag. Also format passenv values due to cannot contain whitespace, and add allowlist_externals where necessary because looks more strictly checked. [1]https://github.com/tox-dev/tox/issues/2730 Conflicts: tox.ini Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7 (cherry picked from commit ef019ed63b7be9b2ff2eff5a1530d0870529da72) --- tox.ini | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index adcd2562..0c390898 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] minversion = 3.8.0 envlist = docs,py38,pep8 -skipsdist = True +skipsdist = False ignore_basepython_conflict = True [testenv] @@ -15,9 +15,15 @@ setenv = VIRTUAL_ENV={envdir} deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/wallaby} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = bash - sh -passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY TOX_ENV_SRC_MODULES +allowlist_externals = bash + {toxinidir}/tools/pip_install_src_modules.sh +passenv = http_proxy + HTTP_PROXY + https_proxy + HTTPS_PROXY + no_proxy + NO_PROXY + TOX_ENV_SRC_MODULES commands = {toxinidir}/tools/pip_install_src_modules.sh "{toxinidir}" stestr run {posargs} @@ -29,6 +35,10 @@ commands = flake8 {toxinidir}/tools/coding-checks.sh --pylint '{posargs}' {[testenv:bandit]commands} {[testenv:genconfig]commands} +allowlist_externals = + {toxinidir}/tools/check_unit_test_structure.sh + {toxinidir}/tools/coding-checks.sh + {toxinidir}/tools/generate_config_file_samples.sh [testenv:venv] commands = {posargs} @@ -124,6 +134,8 @@ paths =./ovn_octavia_provider/hacking [testenv:genconfig] envdir = {toxworkdir}/shared commands = {toxinidir}/tools/generate_config_file_samples.sh +allowlist_externals = + {toxinidir}/tools/generate_config_file_samples.sh # This environment can be used to quickly validate that all needed system # packages required to successfully execute test targets are installed @@ -138,9 +150,9 @@ commands = bindep test [testenv:requirements] deps = -egit+https://opendev.org/openstack/requirements#egg=openstack-requirements -whitelist_externals = sh +allowlist_externals = bash commands = - sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master' + bash -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master' [testenv:bandit] envdir = {toxworkdir}/shared