support/testing/run-tests: specify multiprocessing method

Since Python 3.14, the multiprocessing library API has changed.
Quoting [1]:
"""
On POSIX platforms the default start method was changed from fork to
forkserver to retain the performance but avoid common multithreaded
process incompatibilities.
"""

Since this is expected to be under "if __name__ == '__main__'", we need
to have this in support/testing/run-tests regardless of how this will be
fixed in nose2. See [2].

Fixes:
[3]

[1] https://docs.python.org/3.14/library/multiprocessing.html#contexts-and-start-methods
[2] https://docs.python.org/3.14/library/multiprocessing.html#multiprocessing.set_start_method
[3] https://gitlab.com/buildroot.org/buildroot/-/issues/156

Signed-off-by: Jimmy Durand Wesolowski <jimmy.wesolowski@mobileye.com>
[Julien: slightly reword commit log and add links]
Signed-off-by: Julien Olivain <ju.o@free.fr>
(cherry picked from commit 3d2141bcee)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Jimmy Durand Wesolowski
2026-02-02 16:10:45 +02:00
committed by Thomas Perale
parent d3976bd05b
commit 8fd75e7735

View File

@@ -142,4 +142,5 @@ def main():
if __name__ == "__main__":
multiprocessing.set_start_method("fork")
sys.exit(main())