summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-10-03 07:07:22 +0200
committerJürg Billeter <j@bitron.ch>2019-03-06 11:30:51 +0100
commitf7461e17575f6cdb0dad1319b3b999e9d29dfcac (patch)
tree00b5deda9b1078624c6ed2a26e2a3f29071bc411
parentecd4b1f7ededef5bda167ddebf211402d4d6530a (diff)
downloadbuildstream-juerg/remote-execution-cas.tar.gz
_sandboxremote.py: Add support for embedded stdout and stderrjuerg/remote-execution-cas
Part of #797.
-rw-r--r--buildstream/sandbox/_sandboxremote.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py
index d49f31133..be3234796 100644
--- a/buildstream/sandbox/_sandboxremote.py
+++ b/buildstream/sandbox/_sandboxremote.py
@@ -291,6 +291,8 @@ class SandboxRemote(Sandbox):
self._set_virtual_directory(new_dir)
def _run(self, command, flags, *, cwd, env):
+ stdout, stderr = self._get_output()
+
# set up virtual dircetory
upload_vdir = self.get_virtual_directory()
cascache = self._get_context().get_cascache()
@@ -357,11 +359,16 @@ class SandboxRemote(Sandbox):
# Get output of build
self.process_job_output(action_result.output_directories, action_result.output_files)
+ if stdout:
+ if action_result.stdout_raw:
+ stdout.write(str(action_result.stdout_raw, 'utf-8', errors='ignore'))
+ if stderr:
+ if action_result.stderr_raw:
+ stderr.write(str(action_result.stderr_raw, 'utf-8', errors='ignore'))
+
if action_result.exit_code != 0:
# A normal error during the build: the remote execution system
# has worked correctly but the command failed.
- # action_result.stdout and action_result.stderr also contains
- # build command outputs which we ignore at the moment.
return action_result.exit_code
return 0