Skip to content

Commit 0e18664

Browse files
committed
Limit tox version to <4
This patch limitis the tox version to <4 in stable/yoga. Related-Bug: #1999558 Change-Id: I9c62d429bb819336da05055fecd08e3816986bf8
1 parent 70f32b9 commit 0e18664

File tree

3 files changed

+30
-20
lines changed

3 files changed

+30
-20
lines changed

playbooks/configure_functional_job.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
- hosts: all
22
roles:
3-
- ensure-tox
3+
- role: ensure-tox
4+
vars:
5+
ensure_tox_version: "<4"
46
# TODO(slaweq): remove it when nftables will support syntax for src and
57
# destination IP addresses in arp tables:
68
- legacy_ebtables

playbooks/run_functional_job.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44
bindep_profile: test
55
bindep_dir: "{{ zuul_work_dir }}"
66
- test-setup
7-
- ensure-tox
7+
- role: ensure-tox
8+
vars:
9+
ensure_tox_version: "<4"
810
- tox

tox.ini

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
22
envlist = docs,py38,pep8
33
minversion = 3.18.0
4-
skipsdist = True
4+
skipsdist = False
55
ignore_basepython_conflict = True
66

77
[testenv]
@@ -12,16 +12,24 @@ setenv = VIRTUAL_ENV={envdir}
1212
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
1313
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}
1414
PYTHONWARNINGS=default::DeprecationWarning,ignore::DeprecationWarning:distutils,ignore::DeprecationWarning:site
15-
passenv = TRACE_FAILONLY GENERATE_HASHES http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY TOX_ENV_SRC_MODULES
15+
passenv = TRACE_FAILONLY
16+
GENERATE_HASHES
17+
http_proxy
18+
HTTP_PROXY
19+
https_proxy
20+
HTTPS_PROXY
21+
no_proxy
22+
NO_PROXY
23+
TOX_ENV_SRC_MODULES
1624
usedevelop = True
1725
deps =
1826
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga}
1927
-r{toxinidir}/requirements.txt
2028
-r{toxinidir}/test-requirements.txt
2129
hacking>=3.0.1,<3.1.0 # Apache-2.0
22-
allowlist_externals = sh
30+
allowlist_externals = bash
2331
commands =
24-
{toxinidir}/tools/pip_install_src_modules.sh "{toxinidir}"
32+
bash {toxinidir}/tools/pip_install_src_modules.sh "{toxinidir}"
2533
stestr run {posargs}
2634

2735
# there is also secret magic in ostestr which lets you run in a fail only
@@ -63,7 +71,7 @@ setenv = {[testenv:functional]setenv}
6371
deps =
6472
{[testenv:functional]deps}
6573
commands =
66-
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
74+
bash {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
6775
stestr run --exclude-regex (.*MySQL\.|.*PostgreSQL\.) {posargs}
6876
stestr run --combine --concurrency 1 (.*MySQL\.|.*PostgreSQL\.) {posargs}
6977

@@ -80,16 +88,16 @@ setenv = {[testenv]setenv}
8088
deps =
8189
{[testenv:functional]deps}
8290
commands =
83-
{toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
84-
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
91+
bash {toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
92+
bash {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
8593
stestr run --concurrency 2 {posargs}
8694

8795
[testenv:dsvm-fullstack-gate]
8896
setenv = {[testenv:dsvm-fullstack]setenv}
8997
deps = {[testenv:dsvm-fullstack]deps}
9098
commands =
91-
{toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
92-
{toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
99+
bash {toxinidir}/tools/generate_dhclient_script_for_fullstack.sh {envdir}
100+
bash {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envdir}/bin
93101
stestr run --concurrency 2 --black-regex neutron.tests.fullstack.test_securitygroup.TestSecurityGroupsSameNetwork.test_securitygroup {posargs}
94102
stestr run --combine --concurrency 1 neutron.tests.fullstack.test_securitygroup.TestSecurityGroupsSameNetwork.test_securitygroup {posargs}
95103

@@ -108,20 +116,18 @@ deps =
108116
pylint==2.5.3 # GPLv2
109117
commands=
110118
# If it is easier to add a check via a shell script, consider adding it in this file
111-
sh ./tools/misc-sanity-checks.sh
112-
{toxinidir}/tools/check_unit_test_structure.sh
119+
bash ./tools/misc-sanity-checks.sh
120+
bash {toxinidir}/tools/check_unit_test_structure.sh
113121
# Checks for coding and style guidelines
114122
flake8
115-
sh ./tools/coding-checks.sh --pylint '{posargs}'
123+
bash ./tools/coding-checks.sh --pylint '{posargs}'
116124
neutron-db-manage --config-file neutron/tests/etc/neutron.conf check_migration
117125
python ./tools/list_moved_globals.py
118126
{[testenv:genconfig]commands}
119127
{[testenv:bashate]commands}
120128
{[testenv:bandit]commands}
121129
{[testenv:genpolicy]commands}
122-
allowlist_externals =
123-
sh
124-
bash
130+
allowlist_externals = bash
125131

126132
[testenv:cover]
127133
envdir = {toxworkdir}/shared
@@ -238,7 +244,7 @@ commands = bash -c "find {toxinidir} \
238244

239245
[testenv:genconfig]
240246
envdir = {toxworkdir}/shared
241-
commands = {toxinidir}/tools/generate_config_file_samples.sh
247+
commands = bash {toxinidir}/tools/generate_config_file_samples.sh
242248

243249
[testenv:genpolicy]
244250
envdir = {toxworkdir}/shared
@@ -257,6 +263,6 @@ commands = bindep test
257263
[testenv:requirements]
258264
deps =
259265
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
260-
allowlist_externals = sh
266+
allowlist_externals = bash
261267
commands =
262-
sh -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'
268+
bash -c '{envdir}/src/openstack-requirements/playbooks/files/project-requirements-change.py --req {envdir}/src/openstack-requirements --local {toxinidir} master'

0 commit comments

Comments
 (0)