Skip to content

Commit 29f558d

Browse files
author
Tobias Kopp
committed
[ITest] Add explanation for passing binaries
1 parent 175631a commit 29f558d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/IntegrationTest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ def run_stage(args, test_case, stage_name, command) -> Tuple[bool, list[str]]:
138138

139139

140140
def run_test_case(test_case, args, binaries):
141-
# Set global binaries
141+
# On MacOS, the behavior of global variables for spawned subprocesses is different than on
142+
# linux: the value of a global variable "may not be the same as the value in the parent process".
143+
# Therefore, we pass the binaries as parameter to this method. We then set the global BINARIES
144+
# variable again so that we do not have to pass it on to the other methods.
145+
# For more detailed information, see
146+
# https://stackoverflow.com/questions/75066117/global-list-variable-in-multiprocessing-pool-is-returning-as-empty-in-python
142147
global BINARIES
143148
BINARIES = dict(binaries)
144149

0 commit comments

Comments
 (0)