diff options
author | Jürg Billeter <j@bitron.ch> | 2018-10-03 07:07:22 +0200 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-03-08 14:55:39 +0000 |
commit | 8c6666391abf74a1c9aaf29b21ed1c2f63739e79 (patch) | |
tree | 09494c2260b85bdc71ac2305f0f18b4202d99f51 | |
parent | 0f124fc2fb8f1b22f892f2e2f3a9703775a7aaa1 (diff) | |
download | buildstream-8c6666391abf74a1c9aaf29b21ed1c2f63739e79.tar.gz |
_sandboxremote.py: Add support for embedded stdout and stderr
Part of #797.
-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 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 |