diff options
author | Jürg Billeter <j@bitron.ch> | 2020-02-06 10:52:11 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2020-02-11 21:08:59 +0100 |
commit | ee456e854dd6f356e502147cdab6178b453665c5 (patch) | |
tree | 49dfd2c1106713cd0817bb44e3413abd384f08bd | |
parent | 83c210ef715014db459a2996ddef447bc1969257 (diff) | |
download | buildstream-ee456e854dd6f356e502147cdab6178b453665c5.tar.gz |
_sandboxreapi.py: Support setting output_node_properties
-rw-r--r-- | src/buildstream/sandbox/_sandboxreapi.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py index 7876a118d..5a3cd5e76 100644 --- a/src/buildstream/sandbox/_sandboxreapi.py +++ b/src/buildstream/sandbox/_sandboxreapi.py @@ -29,6 +29,11 @@ from .._protos.build.bazel.remote.execution.v2 import remote_execution_pb2 # the Remote Execution API. # class SandboxREAPI(Sandbox): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + self._output_node_properties = kwargs.get("output_node_properties") + def _use_cas_based_directory(self): # Always use CasBasedDirectory for REAPI return True @@ -78,6 +83,8 @@ class SandboxREAPI(Sandbox): command_proto = self._create_command(command, cwd, env, read_write_directories) command_digest = cascache.add_object(buffer=command_proto.SerializeToString()) action = remote_execution_pb2.Action(command_digest=command_digest, input_root_digest=input_root_digest) + if self._output_node_properties: + action.output_node_properties.extend(self._output_node_properties) action_result = self._execute_action(action, flags) # pylint: disable=assignment-from-no-return |