Skip to content

Commit

Permalink
Fix jobs after tox4 upgrade
Browse files Browse the repository at this point in the history
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]tox-dev/tox#2730

Change-Id: Iea8e355cd18c51a00bdbe5225239965cfc1704d7
(cherry picked from commit ef019ed)
  • Loading branch information
Fernando Royo committed Jan 2, 2023
1 parent 130ed10 commit 770ce89
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
minversion = 3.18.0
envlist = docs,py38,pep8
skipsdist = True
skipsdist = False
ignore_basepython_conflict = True

[testenv]
Expand All @@ -16,8 +16,14 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/up
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals = bash
sh
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY TOX_ENV_SRC_MODULES
{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}
Expand All @@ -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}
Expand Down Expand Up @@ -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
Expand All @@ -138,9 +150,9 @@ commands = bindep test
[testenv:requirements]
deps =
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
allowlist_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
Expand Down

0 comments on commit 770ce89

Please sign in to comment.