summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/sandbox/sandbox.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/buildstream/sandbox/sandbox.py b/buildstream/sandbox/sandbox.py
index 93db2f8ca..c96ccb57b 100644
--- a/buildstream/sandbox/sandbox.py
+++ b/buildstream/sandbox/sandbox.py
@@ -147,6 +147,8 @@ class Sandbox():
os.makedirs(directory_, exist_ok=True)
self._output_directory = None
+ self._build_directory = None
+ self._build_directory_always = None
self._vdir = None
self._usebuildtree = False
@@ -592,6 +594,20 @@ class Sandbox():
def _disable_run(self):
self.__allow_run = False
+ # _set_build_directory()
+ #
+ # Sets the build directory - the directory which may be preserved as
+ # buildtree in the artifact.
+ #
+ # Args:
+ # directory (str): An absolute path within the sandbox
+ # always (bool): True if the build directory should always be downloaded,
+ # False if it should be downloaded only on failure
+ #
+ def _set_build_directory(self, directory, *, always):
+ self._build_directory = directory
+ self._build_directory_always = always
+
# _SandboxBatch()
#