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

Unified Diff: scripts/slave/recipe_modules/chromium/api.py

Issue 873403002: Add support for cc_perftests and other non-telemetry gtest based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years, 11 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: 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]
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/chromium/steps.py » ('j') | scripts/slave/recipe_modules/chromium_android/api.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698