summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShahwat Dalal <sdalal29@bloomberg.net>2019-05-23 14:44:59 +0100
committerShahwat Dalal <sdalal29@bloomberg.net>2019-05-23 14:45:21 +0100
commit29f427937f7139db828b861dfacbe67413eb393e (patch)
treefc56604b52b723e2436ca8cdfa3527b6010b453f
parentbccb4f15a784a80561c32665ced44554dbd9b5ce (diff)
downloadbuildstream-shashwatdalal/updatesiteflags.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.
-rw-r--r--buildstream/testing/_utils/site.py5
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