Commit c3a306fc authored by Juan Antonio Navarro Perez's avatar Juan Antonio Navarro Perez Committed by Commit Bot

[tools/perf] Fix run_benchmark return code

The CL introducing the results processor [1] broke reporting of
Telemetry's return_code when called via run_benchmark.

[1]: https://chromium-review.googlesource.com/c/chromium/src/+/1692986

This is a quick fix for that.

Adding tests to make sure we don't break this again in the future as
follow up CLs.

TBR=crouleau@chromium.org

Bug: 990472
Change-Id: I4139d4b7503bad6555b5ee8d919499dd32fbff37
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1735581Reviewed-by: default avatarJuan Antonio Navarro Pérez <perezju@chromium.org>
Commit-Queue: Juan Antonio Navarro Pérez <perezju@chromium.org>
Cr-Commit-Position: refs/heads/master@{#683972}
parent 611f3870
...@@ -19,5 +19,6 @@ def main(config): ...@@ -19,5 +19,6 @@ def main(config):
environment=config, environment=config,
results_arg_parser=results_processor.ArgumentParser()) results_arg_parser=results_processor.ArgumentParser())
results_processor.ProcessOptions(options) results_processor.ProcessOptions(options)
command_line.RunCommand(options) run_return_code = command_line.RunCommand(options)
results_processor.ProcessResults(options) process_return_code = results_processor.ProcessResults(options)
return max(run_return_code, process_return_code)
...@@ -111,6 +111,6 @@ def ProcessResults(options): ...@@ -111,6 +111,6 @@ def ProcessResults(options):
after any adjustments from ProcessOptions were applied. after any adjustments from ProcessOptions were applied.
""" """
if not getattr(options, 'output_formats', None): if not getattr(options, 'output_formats', None):
return return 0
raise NotImplementedError(options.output_formats) raise NotImplementedError(options.output_formats)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment