Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Unified Diff: tools/telemetry/telemetry/benchmark_runner.py

Issue 1051783003: Fix crash when running "run_benchmark help run" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/command_line.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/telemetry/telemetry/benchmark_runner.py
diff --git a/tools/telemetry/telemetry/benchmark_runner.py b/tools/telemetry/telemetry/benchmark_runner.py
index a9b7ec6a70bc1c58d2f6a756936c633e0be6b6de..745ea4360524b7ea6dddba60d1bd5eed5a18a704 100644
--- a/tools/telemetry/telemetry/benchmark_runner.py
+++ b/tools/telemetry/telemetry/benchmark_runner.py
@@ -62,13 +62,13 @@ class Help(command_line.OptparseCommand):
usage = '[command]'
- def Run(self, args):
+ def Run(self, args, environment):
if len(args.positional_args) == 1:
commands = _MatchingCommands(args.positional_args[0])
if len(commands) == 1:
command = commands[0]
parser = command.CreateParser()
- command.AddCommandLineArgs(parser, None)
+ command.AddCommandLineArgs(parser, environment)
parser.print_help()
return 0
@@ -108,7 +108,7 @@ class List(command_line.OptparseCommand):
else:
parser.error('Must provide at most one benchmark name.')
- def Run(self, args):
+ def Run(self, args, _):
possible_browser = browser_finder.FindBrowser(args)
if args.browser_type in (
'exact', 'release', 'release_x64', 'debug', 'debug_x64', 'canary'):
@@ -191,7 +191,7 @@ class Run(command_line.OptparseCommand):
cls._benchmark = benchmark_class
- def Run(self, args):
+ def Run(self, args, _):
return min(255, self._benchmark().Run(args))
@@ -377,4 +377,4 @@ def main(environment):
args = args[1:]
options.positional_args = args
command.ProcessCommandLineArgs(parser, options, environment)
- return command().Run(options)
+ return command().Run(options, environment)
« no previous file with comments | « no previous file | tools/telemetry/telemetry/core/command_line.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698