Index: scripts/slave/recipe_modules/chromium/api.py |
diff --git a/scripts/slave/recipe_modules/chromium/api.py b/scripts/slave/recipe_modules/chromium/api.py |
index 19bb5343c8ecd73354e70a37bcc0b1778e715d0f..c6ee35338c68c215b5a230a8c387fd8680720227 100644 |
--- a/scripts/slave/recipe_modules/chromium/api.py |
+++ b/scripts/slave/recipe_modules/chromium/api.py |
@@ -636,6 +636,36 @@ class ChromiumApi(recipe_api.RecipeApi): |
infra_step=True, |
**kwargs) |
+ def list_gtest_perf_tests(self, buildername): |
+ path_to_json = self.m.path['checkout'].join( |
ghost stip (do not use)
2015/01/27 01:02:02
why not just use self.m.json.read() here?
|
+ 'testing', 'buildbot', 'chromium.perf.json') |
+ |
+ return self.m.python.inline( |
+ 'List Non-Telemetry Perf Tests', |
+ """ |
+ import json |
+ import os |
+ import sys |
+ builder_name = sys.argv[1] |
+ json_input_path = sys.argv[2] |
+ json_output_path = sys.argv[3] |
+ |
+ with open(json_output_path, 'w') as dst: |
+ if not os.path.exists(json_input_path): |
+ json.dump({}, dst) |
+ else: |
+ with open(json_input_path, 'r') as src: |
+ data = json.load(src).get(builder_name, {}) |
+ json.dump(data, dst) |
+ """, |
+ args=[buildername, path_to_json, self.m.json.output()], |
+ step_test_data=lambda: self.m.json.test_api.output({ |
+ "cc_perftests": { |
+ "cmd": "cc_perftests", |
+ "perf_dashboard_id": "cc_perftests", |
+ } |
+ })) |
+ |
def list_perf_tests(self, browser, num_shards, devices=[]): |
args = ['list', '--browser', browser, '--json-output', |
self.m.json.output(), '--num-shards', num_shards] |