Skip to content

Commit 9718ffe

Browse files
vodorokdkrupp
authored andcommitted
Make multiprocess store working on OSX
1 parent ba62da8 commit 9718ffe

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

web/client/codechecker_client/blame_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def assemble_blame_info(
118118
# being present in windows, so stuff like setting up
119119
# PYTHONPATH in parent CodeChecker before store is executed
120120
# are lost.
121-
if sys.platform == "win32":
121+
if sys.platform == "win32" or sys.platform == "darwin":
122122
file_blame_info = __collect_blame_info_for_files(file_paths)
123123
else:
124124
with ProcessPoolExecutor() as executor:

web/client/codechecker_client/cmd/store.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,12 @@ def filter_source_files_with_comments(
370370
# being present in windows, so stuff like setting up
371371
# PYTHONPATH in parent CodeChecker before store is executed
372372
# are lost.
373-
if sys.platform == "win32":
373+
if sys.platform == "win32": #or sys.platform == "darwin":
374374
return get_source_file_with_comments(jobs)
375+
elif sys.platform == "darwin":
376+
import multiprocess
377+
with multiprocess.Pool() as pool:
378+
return get_source_file_with_comments(jobs, pool.map)
375379
else:
376380
with ProcessPoolExecutor() as executor:
377381
return get_source_file_with_comments(jobs, executor.map)
@@ -449,6 +453,13 @@ def assemble_zip(inputs, zip_file, client, checker_labels: CheckerLabels):
449453
if sys.platform == "win32":
450454
analyzer_result_file_reports = parse_analyzer_result_files(
451455
analyzer_result_file_paths, checker_labels)
456+
457+
elif sys.platform == "darwin":
458+
import multiprocess
459+
with multiprocess.Pool() as pool:
460+
analyzer_result_file_reports = parse_analyzer_result_files(
461+
analyzer_result_file_paths, checker_labels, pool.map)
462+
452463
else:
453464
with ProcessPoolExecutor() as executor:
454465
analyzer_result_file_reports = parse_analyzer_result_files(

0 commit comments

Comments
 (0)