diff options
author | Jürg Billeter <j@bitron.ch> | 2019-04-03 11:33:26 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2019-04-12 11:17:33 +0200 |
commit | 4f04e714a66e7fc550248fe10d9acb11e376c315 (patch) | |
tree | 566ef6f6c8957fb815865c569fa53c8298911499 | |
parent | 18f3a8ad07746cc62319b2520752a078c9cd4dfb (diff) | |
download | buildstream-4f04e714a66e7fc550248fe10d9acb11e376c315.tar.gz |
sandbox.py: Add _set_build_directory() method
This will enable SandboxRemote to download the file blobs of the build
directory only when needed.
-rw-r--r-- | buildstream/sandbox/sandbox.py | 16 |
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() # |