From 29f427937f7139db828b861dfacbe67413eb393e Mon Sep 17 00:00:00 2001 From: Shahwat Dalal Date: Thu, 23 May 2019 14:44:59 +0100 Subject: 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 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 -- cgit v1.2.1