summaryrefslogtreecommitdiff
blob: 19ae16b5ac7267e3e22930f447febe8be7a31f50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Alteration of the original patch to force fork mode iso spawn

From f093da4a3a457d539e5682ccecdf91f254addd8c Mon Sep 17 00:00:00 2001
From: Zac Medico <zmedico@gentoo.org>
Date: Thu, 3 Dec 2020 21:37:39 -0800
Subject: [PATCH] runTests.py: multiprocessing.set_start_method('spawn') for
 debugging bug 758230

Force fork mode because spawn mode requires all argument to be
pickle-able, which currently is not the case.  This is an issue because
Python 3.8 changed the default from fork to spawn on macOS.

diff --git a/lib/portage/tests/runTests.py b/lib/portage/tests/runTests.py
index 9514abebe0..6e33077aef 100755
--- a/lib/portage/tests/runTests.py
+++ b/lib/portage/tests/runTests.py
@@ -4,6 +4,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 import grp
+import multiprocessing
 import os
 import os.path as osp
 import platform
@@ -60,6 +61,7 @@ def debug_signal(signum, frame):
 	os.environ["PATH"] = ":".join(path)
 
 if __name__ == "__main__":
+	multiprocessing.set_start_method('fork')
 	try:
 		sys.exit(tests.main())
 	finally: