diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-10-09 17:01:57 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-12-04 19:22:05 +0100 |
commit | 8e60de830bca09ba8e1044ba2421014f23c4d5f1 (patch) | |
tree | 87a7ea3344ad6584b83e3c1b6260e49078587c2b | |
parent | 7e62d33caecc486e43d7e26794268beb6a3d9f02 (diff) | |
download | buildstream-8e60de830bca09ba8e1044ba2421014f23c4d5f1.tar.gz |
linux.py: Support experimental buildbox-run sandbox
The buildbox-run sandbox is used only if BST_FORCE_SANDBOX is set to
buildbox-run.
-rw-r--r-- | src/buildstream/_platform/linux.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/buildstream/_platform/linux.py b/src/buildstream/_platform/linux.py index bdc2e0df1..994695a1d 100644 --- a/src/buildstream/_platform/linux.py +++ b/src/buildstream/_platform/linux.py @@ -32,6 +32,7 @@ class Linux(Platform): sandbox_setups = { "bwrap": self._setup_bwrap_sandbox, "buildbox": self._setup_buildbox_sandbox, + "buildbox-run": self._setup_buildboxrun_sandbox, "chroot": self._setup_chroot_sandbox, "dummy": self._setup_dummy_sandbox, } @@ -153,3 +154,23 @@ class Linux(Platform): self.check_sandbox_config = self._check_sandbox_config_buildbox self.create_sandbox = self._create_buildbox_sandbox return True + + # Buildbox run sandbox methods + def _check_sandbox_config_buildboxrun(self, config): + from ..sandbox._sandboxbuildboxrun import SandboxBuildBoxRun + + return SandboxBuildBoxRun.check_sandbox_config(self, config) + + @staticmethod + def _create_buildboxrun_sandbox(*args, **kwargs): + from ..sandbox._sandboxbuildboxrun import SandboxBuildBoxRun + + return SandboxBuildBoxRun(*args, **kwargs) + + def _setup_buildboxrun_sandbox(self): + from ..sandbox._sandboxbuildboxrun import SandboxBuildBoxRun + + self._check_sandbox(SandboxBuildBoxRun) + self.check_sandbox_config = self._check_sandbox_config_buildboxrun + self.create_sandbox = self._create_buildboxrun_sandbox + return True |