Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c2b9e5

Browse files
committed
properly handling the --suppress-exit-code that was getting appended once per package
1 parent ce71f4b commit 3c2b9e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/devops_tasks/setup_execute_tests.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def prep_and_run_tox(targeted_packages, tox_env, options_array=[]):
136136
for package_dir in [package for package in targeted_packages]:
137137
destination_tox_ini = os.path.join(package_dir, "tox.ini")
138138
destination_dev_req = os.path.join(package_dir, "dev_requirements.txt")
139-
allowed_return_codes = []
140139
tox_execution_array = ["tox"]
140+
local_options_array = options_array[:]
141141

142142
# if we are targeting only packages that are management plane, it is a possibility
143143
# that no tests running is an acceptable situation
@@ -150,7 +150,7 @@ def prep_and_run_tox(targeted_packages, tox_env, options_array=[]):
150150
[package_dir],
151151
)
152152
):
153-
tox_execution_array.append("--suppress-no-test-exit-code")
153+
local_options_array.append("--suppress-no-test-exit-code")
154154

155155
# if not present, re-use base
156156
if not os.path.exists(destination_tox_ini):
@@ -166,8 +166,8 @@ def prep_and_run_tox(targeted_packages, tox_env, options_array=[]):
166166
if tox_env:
167167
tox_execution_array.extend(["-e", tox_env])
168168

169-
if options_array:
170-
tox_execution_array.extend(["--"] + options_array)
169+
if local_options_array:
170+
tox_execution_array.extend(["--"] + local_options_array)
171171

172172
run_check_call(tox_execution_array, package_dir)
173173

0 commit comments

Comments
 (0)