au_test_harness: adapt to chromite CommandResult changes
Since
https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1818781
CommandResult.output is a compatibility wrapper for .stdout, and it does
not have a setter. Switch to .stdout, and stop trying to modify the
object unnecessarily.
BUG=none
TEST=none
Exempt-From-Owner-Approval: CQ is broken
Change-Id: I8c1d160ad6fc390ec838e790d44638f5b7416899
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crostestutils/+/1830348
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
diff --git a/au_test_harness/vm_au_worker.py b/au_test_harness/vm_au_worker.py
index c986ffe..e3e8956 100644
--- a/au_test_harness/vm_au_worker.py
+++ b/au_test_harness/vm_au_worker.py
@@ -114,12 +114,14 @@
cwd=chromite_constants.CHROMITE_BIN_DIR, error_code_ok=True,
capture_output=not self.verbose)
# If the command failed or printed warnings, print the output.
- # TODO(pwang): result.output should contain the output of the command even
+ # TODO(pwang): result.stdout should contain the output of the command even
# though verbose is set to print to stdout.
- if result.output is None:
- result.output = ''
- if result.returncode != 0 or '@@@STEP_WARNINGS@@@' in result.output:
- print(result.output)
+ if result.stdout is None:
+ out = ''
+ else:
+ out = result.stdout
+ if result.returncode != 0 or '@@@STEP_WARNINGS@@@' in out:
+ print(out)
self._HandleFail(log_directory, fail_directory)
return result.returncode == 0