diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-03 07:07:22 +0200 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2018-11-30 14:24:53 +0000 |
commit | 71de8650bbd6bab001f35e48c32773f388e8aae1 (patch) | |
tree | 6e29fbe317f0c382d75a9c6f4f557c9bd35cf492 | |
parent | ad293ed38b5d9d72432ac882901a3c28b720069b (diff) | |
download | buildstream-juerg/remote-execution-stdout-stderr.tar.gz |
sandbox/_sandboxremote.py: Add initial support for stdout and stderrjuerg/remote-execution-stdout-stderr
-rw-r--r-- | buildstream/sandbox/_sandboxremote.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/buildstream/sandbox/_sandboxremote.py b/buildstream/sandbox/_sandboxremote.py index c366b3f40..dbd4bbded 100644 --- a/buildstream/sandbox/_sandboxremote.py +++ b/buildstream/sandbox/_sandboxremote.py @@ -283,6 +283,8 @@ class SandboxRemote(Sandbox): self._set_virtual_directory(new_dir) def _run(self, command, flags, *, cwd, env): + stdout, stderr = self._get_output() + # Upload sources upload_vdir = self.get_virtual_directory() @@ -326,11 +328,16 @@ class SandboxRemote(Sandbox): action_result = execution_response.result + 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 self.process_job_output(action_result.output_directories, action_result.output_files) |