Skip to content

Commit d7adb6e

Browse files
committed
python3: fix multiprocessing module bug with serialization
Part of #265
1 parent 38890e0 commit d7adb6e

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

dispatcher.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ class Dispatcher:
8282
```
8383
"""
8484
def __init__(self, task_groups, max_workers_cnt, randomize):
85+
"""
86+
try:
87+
# Python 3
88+
multiprocessing.set_start_method('fork')
89+
except AttributeError:
90+
pass
91+
"""
8592
self.pids = []
8693
self.processes = []
8794
self.result_queues = []

lib/test_suite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ def __init__(self, suite_path, args):
120120
self.ini[i] = dict.fromkeys(self.ini[i].split()) \
121121
if i in self.ini else dict()
122122
for i in ["lua_libs"]:
123-
self.ini[i] = map(
124-
lambda x: os.path.join(suite_path, x),
125-
dict.fromkeys(self.ini[i].split())
126-
if i in self.ini else dict())
123+
lua_libs = self.ini.get(i, "")
124+
self.ini[i] = []
125+
for p in lua_libs.split():
126+
self.ini[i].append(os.path.join(suite_path, p))
127127
if config.has_option("default", "fragile"):
128128
fragiles = config.get("default", "fragile")
129129
try:

0 commit comments

Comments
 (0)