diff options
author | Benjamin Schubert <contact@benschubert.me> | 2019-10-09 17:01:57 +0100 |
---|---|---|
committer | Benjamin Schubert <contact@benschubert.me> | 2019-10-14 15:20:30 +0100 |
commit | cc8c05bdfa64db469860ee27673ea2ad2203cd1f (patch) | |
tree | 6df5b1751a5d6dee3385eb7ef4ba59d438943d2b /src/buildstream/_platform/linux.py | |
parent | 13d9ab50e96d4a22f26ba9e4b67e7f2088b51edf (diff) | |
download | buildstream-cc8c05bdfa64db469860ee27673ea2ad2203cd1f.tar.gz |
Buildbox-run POCbschubert/buildboxrun-sandbox
Diffstat (limited to 'src/buildstream/_platform/linux.py')
-rw-r--r-- | src/buildstream/_platform/linux.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/buildstream/_platform/linux.py b/src/buildstream/_platform/linux.py index b400bfaac..be8b771c5 100644 --- a/src/buildstream/_platform/linux.py +++ b/src/buildstream/_platform/linux.py @@ -33,6 +33,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, } @@ -143,3 +144,20 @@ 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 |