diff options
author | Shahwat Dalal <sdalal29@bloomberg.net> | 2019-05-23 14:44:59 +0100 |
---|---|---|
committer | Shahwat Dalal <sdalal29@bloomberg.net> | 2019-05-23 14:45:21 +0100 |
commit | 29f427937f7139db828b861dfacbe67413eb393e (patch) | |
tree | fc56604b52b723e2436ca8cdfa3527b6010b453f /buildstream/testing/_utils/site.py | |
parent | bccb4f15a784a80561c32665ced44554dbd9b5ce (diff) | |
download | buildstream-29f427937f7139db828b861dfacbe67413eb393e.tar.gz |
tests: Change HAVE_SANDBOX to fail on windows/OSXshashwatdalal/updatesiteflags
HAVE_SANDBOX returns false when running buildstream on
OSX and Windows as the sandbox is not fully functional on neither
platform.
Diffstat (limited to 'buildstream/testing/_utils/site.py')
-rw-r--r-- | buildstream/testing/_utils/site.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/testing/_utils/site.py b/buildstream/testing/_utils/site.py index 54c5b467b..13170b299 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 |