You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 07:40:25 UTC

[buildstream] 13/27: WIP: force start method in test site

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch aevri/check_spawn_ci_working
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 35199d29bcc7224473dc02286564989ef95f45f0
Author: Angelos Evripiotis <je...@bloomberg.net>
AuthorDate: Wed Oct 16 16:54:58 2019 +0100

    WIP: force start method in test site
---
 src/buildstream/testing/_utils/site.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py
index b098b7d..1b631f4 100644
--- a/src/buildstream/testing/_utils/site.py
+++ b/src/buildstream/testing/_utils/site.py
@@ -2,6 +2,7 @@
 # so we dont have to repeat this everywhere
 #
 import os
+import multiprocessing
 import subprocess
 import sys
 import platform
@@ -78,6 +79,11 @@ MACHINE_ARCH = Platform.get_host_arch()
 
 HAVE_SANDBOX = os.getenv('BST_FORCE_SANDBOX')
 
+# TODO: document
+if 'BST_FORCE_START_METHOD' in os.environ:
+    start_method = os.environ['BST_FORCE_START_METHOD']
+    multiprocessing.set_start_method(start_method)
+
 if HAVE_SANDBOX is not None:
     pass
 elif IS_LINUX and HAVE_BWRAP and (not IS_WSL):