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

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

Issue 596783005: [Telemetry] Do not run session_restore benchmarks on reference builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: tools/telemetry/telemetry/test_runner.py
diff --git a/tools/telemetry/telemetry/test_runner.py b/tools/telemetry/telemetry/test_runner.py
index 4a3f5489647b2d9bee6e0701dad85920c661c03d..e3cd6036195b0831947ba0920af65aed1f1319b1 100644
--- a/tools/telemetry/telemetry/test_runner.py
+++ b/tools/telemetry/telemetry/test_runner.py
@@ -89,10 +89,11 @@ class List(command_line.OptparseCommand):
def Run(self, args):
if args.json_output_file:
possible_browser = browser_finder.FindBrowser(args)
- has_ref = 'reference' in browser_finder.GetAllAvailableBrowserTypes(args)
+ args.browser_type = 'reference'
+ possible_reference_browser = browser_finder.FindBrowser(args)
with open(args.json_output_file, 'w') as f:
- f.write(_GetJsonTestList(possible_browser, has_ref, args.tests,
- args.num_shards))
+ f.write(_GetJsonTestList(possible_browser, possible_reference_browser,
+ args.tests, args.num_shards))
else:
_PrintTestList(args.tests)
return 0
@@ -255,7 +256,8 @@ def _MatchTestName(input_test_name, exact_matches=True):
if _Matches(input_test_name, test_class.Name())]
-def _GetJsonTestList(possible_browser, has_reference, test_classes, num_shards):
+def _GetJsonTestList(possible_browser, possible_reference_browser,
+ test_classes, num_shards):
"""Returns a list of all enabled tests in a JSON format expected by buildbots.
JSON format (see build/android/pylib/perf/test_runner.py):
@@ -298,7 +300,8 @@ def _GetJsonTestList(possible_browser, has_reference, test_classes, num_shards):
'device_affinity': device_affinity,
'perf_dashboard_id': perf_dashboard_id,
}
- if has_reference:
+ if (possible_reference_browser and
+ decorators.IsEnabled(test_class, possible_reference_browser)):
output['steps'][base_name + '.reference'] = {
'cmd': ' '.join(base_cmd + [
'--browser=reference', '--output-trace-tag=_ref']),
« tools/perf/benchmarks/session_restore.py ('K') | « tools/perf/benchmarks/session_restore.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698