Revert "cros_build_lib: Support for streaming output."
This reverts commit 8100779766e26dad90273664a621f2ec15c1b2c9.
Reason for revert: Suspected culprit for breaking the Chrome Informational Builders (crbug.com/848811)
Original change's description:
> cros_build_lib: Support for streaming output.
>
> Replace stream_log implementation with implicit streaming output.
>
> The previous approach combined stdout/stderr and logged line by line.
> This approach allows the subprocess to use the parent's stdout/stderr streams,
> and does this when stdout/stderr are not redirected (stderr may be
> redirected to stdout)
>
> We still need to use wait() instead of communicate(), since
> communicate() buffers the output.
>
> BUG=chromium:829481
> TEST=manual
>
> Change-Id: I9270f9a27e454b7cedf525e4ee07cd3d606b9237
> Reviewed-on: https://chromium-review.googlesource.com/1063329
> Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
> Tested-by: Achuith Bhandarkar <achuith@chromium.org>
> Reviewed-by: Don Garrett <dgarrett@chromium.org>
Bug: chromium:829481
Change-Id: I74af87fe89f1c9729cdae937e948956ff3ed7785
Reviewed-on: https://chromium-review.googlesource.com/1091183
Commit-Ready: Jason Clinton <jclinton@chromium.org>
Tested-by: Alec Thilenius <athilenius@google.com>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cros_vm.py b/scripts/cros_vm.py
index d5e2559..7da6628 100644
--- a/scripts/cros_vm.py
+++ b/scripts/cros_vm.py
@@ -414,25 +414,22 @@
if not self.enable_kvm:
self._WaitForProcs()
- def RemoteCommand(self, cmd, stream_output=False, **kwargs):
+ def RemoteCommand(self, cmd, **kwargs):
"""Run a remote command in the VM.
Args:
cmd: command to run.
- stream_output: Stream output of long-running commands.
kwargs: additional args (see documentation for RemoteDevice.RunCommand).
Returns:
cros_build_lib.CommandResult object.
"""
if not self.dry_run:
- kwargs.setdefault('error_code_ok', True)
- if stream_output:
- kwargs.setdefault('capture_output', False)
- else:
- kwargs.setdefault('combine_stdout_stderr', True)
- kwargs.setdefault('log_output', True)
- return self.remote.RunCommand(cmd, debug_level=logging.INFO, **kwargs)
+ return self.remote.RunCommand(cmd, debug_level=logging.INFO,
+ combine_stdout_stderr=True,
+ log_output=True,
+ error_code_ok=True,
+ **kwargs)
@staticmethod
def GetParser():