Chromium Code Reviews| Index: tools/perf/fetch_benchmark_deps.py |
| diff --git a/tools/perf/fetch_benchmark_deps.py b/tools/perf/fetch_benchmark_deps.py |
| index 0a07d061a5a86c84be67d036b1c77af20e64cc19..73749ce2176729372140bcb1fd7c064f297590a4 100755 |
| --- a/tools/perf/fetch_benchmark_deps.py |
| +++ b/tools/perf/fetch_benchmark_deps.py |
| @@ -17,12 +17,17 @@ from py_utils import cloud_storage |
| path_util.AddTelemetryToPath() |
| from telemetry import benchmark_runner |
| +# TODO(nedn): we should not rely on Telemetry private API. |
| +from telemetry.internal.browser import browser_options |
| from chrome_telemetry_build import chromium_config |
| def _FetchDependenciesIfNeeded(story_set): |
| """ Download files needed by a user story set. """ |
| + if not story_set.wpr_archive_info: |
| + return |
| + |
| # Download files in serving_dirs. |
| serving_dirs = story_set.serving_dirs |
| for directory in serving_dirs: |
| @@ -60,8 +65,12 @@ def _EnumerateDependencies(story_set): |
| def FetchDepsForBenchmark(benchmark, output): |
| + parser = browser_options.BrowserFinderOptions().CreateParser() |
| + benchmark.AddCommandLineArgs(parser) |
| + options, _ = parser.parse_args([]) |
| + |
| # Download files according to specified benchmark. |
| - story_set = benchmark().CreateStorySet(None) |
| + story_set = benchmark().CreateStorySet(options) |
| _FetchDependenciesIfNeeded(story_set) |
| @@ -96,9 +105,9 @@ def main(args, output): |
| raw_input( |
| 'No benchmark name is specified. Fetching all benchmark deps. ' |
| 'Press enter to continue...') |
| - for b in benchmark_finders.GetAllBenchmarks(): |
| + for b in benchmark_finders.GetAllPerfBenchmarks(): |
| print >> output, ('Fetch dependencies for benchmark %s:' |
| - % benchmark.Name()) |
| + % b.Name()) |
|
jbudorick
2017/06/06 17:08:15
This fix should still land somewhere, whether in t
|
| FetchDepsForBenchmark(b, output) |
| if __name__ == '__main__': |