You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:37:18 UTC

[buildstream] 01/01: tests: Change HAVE_SANDBOX to fail on windows/OSX

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

root pushed a commit to branch shashwatdalal/updatesiteflags
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 29f427937f7139db828b861dfacbe67413eb393e
Author: Shahwat Dalal <sd...@bloomberg.net>
AuthorDate: Thu May 23 14:44:59 2019 +0100

    tests: Change HAVE_SANDBOX to fail on windows/OSX
    
    HAVE_SANDBOX returns false when running buildstream on
    OSX and Windows as the sandbox is not fully functional on neither
    platform.
---
 buildstream/testing/_utils/site.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buildstream/testing/_utils/site.py b/buildstream/testing/_utils/site.py
index 54c5b46..13170b2 100644
--- a/buildstream/testing/_utils/site.py
+++ b/buildstream/testing/_utils/site.py
@@ -32,11 +32,14 @@ except ProgramNotFoundError:
     HAVE_BWRAP = False
     HAVE_BWRAP_JSON_STATUS = False
 
+IS_MAC = (sys.platform == 'darwin')
 IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
 IS_WSL = (IS_LINUX and 'Microsoft' in platform.uname().release)
 IS_WINDOWS = (os.name == 'nt')
 
-if not IS_LINUX:
+if IS_MAC or IS_WINDOWS:
+    HAVE_SANDBOX = False
+elif not IS_LINUX:
     HAVE_SANDBOX = True   # fallback to a chroot sandbox on unix
 elif IS_WSL:
     HAVE_SANDBOX = False  # Sandboxes are inoperable under WSL due to lack of FUSE