From a1986816fa83ac4a7c2bff85fd4f86c2437e51de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Billeter?= Date: Fri, 30 Aug 2019 09:50:13 +0200 Subject: _context.py: Don't disable fork in the main test process The main test process may be used for further tests that may use fork and thus, fork cannot be disabled. This is a safeguard against hanging tests. --- src/buildstream/_context.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/buildstream/_context.py b/src/buildstream/_context.py index c6cde4003..a4fe6f509 100644 --- a/src/buildstream/_context.py +++ b/src/buildstream/_context.py @@ -496,6 +496,11 @@ class Context(): # with casd in the main process. # def disable_fork(self): + # Can't permanently disable fork in the main test process as the process + # may be used for further tests that may use fork. + if self.is_running_in_test_suite and 'BST_TEST_SUITE_FORKED' not in os.environ: + return + self.fork_allowed = False cascache = self.get_cascache() cascache.notify_fork_disabled() -- cgit v1.2.1