diff options
author | Jürg Billeter <j@bitron.ch> | 2020-06-03 11:37:14 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-06-03 13:49:39 +0200 |
commit | 07275d01416b204bd578c1c3617fcbed8b6e30ed (patch) | |
tree | c7538d077b5bfd35c774c5c8d2041e79cdea274f /src/buildstream/testing | |
parent | 0b79b37a14cfa4db0d991ad2fbcb0891f49ef0b9 (diff) | |
download | buildstream-07275d01416b204bd578c1c3617fcbed8b6e30ed.tar.gz |
Drop sandbox selection and BST_FORCE_SANDBOX
buildbox-run is the only local sandbox and there are no plans to add
other sandboxing backends in the future. New platforms can be supported
by new buildbox-run implementations without requiring any changes in
BuildStream.
Diffstat (limited to 'src/buildstream/testing')
-rw-r--r-- | src/buildstream/testing/_utils/site.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py index 70d23a5cc..577896fe5 100644 --- a/src/buildstream/testing/_utils/site.py +++ b/src/buildstream/testing/_utils/site.py @@ -59,14 +59,13 @@ IS_WINDOWS = os.name == "nt" MACHINE_ARCH = Platform.get_host_arch() -HAVE_SANDBOX = os.getenv("BST_FORCE_SANDBOX") - +HAVE_SANDBOX = None BUILDBOX_RUN = None -if HAVE_SANDBOX is None: - try: - path = utils.get_host_tool("buildbox-run") - subprocess.run([path, "--capabilities"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) - BUILDBOX_RUN = os.path.basename(os.readlink(path)) - HAVE_SANDBOX = "buildbox-run" - except (ProgramNotFoundError, OSError, subprocess.CalledProcessError): - pass + +try: + path = utils.get_host_tool("buildbox-run") + subprocess.run([path, "--capabilities"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + BUILDBOX_RUN = os.path.basename(os.readlink(path)) + HAVE_SANDBOX = "buildbox-run" +except (ProgramNotFoundError, OSError, subprocess.CalledProcessError): + pass |