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

Side by Side Diff: scripts/slave/recipe_modules/webrtc/api.py

Issue 541343004: WebRTC: Pass WebRTC revision to perf dashboard for FYI bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Rebased Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | scripts/slave/recipes/webrtc/chromium.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import ast
6 import json
7
5 from slave import recipe_api 8 from slave import recipe_api
6 from slave.recipe_modules.webrtc import builders 9 from slave.recipe_modules.webrtc import builders
7 10
8 11
9 class WebRTCApi(recipe_api.RecipeApi): 12 class WebRTCApi(recipe_api.RecipeApi):
10 def __init__(self, **kwargs): 13 def __init__(self, **kwargs):
11 super(WebRTCApi, self).__init__(**kwargs) 14 super(WebRTCApi, self).__init__(**kwargs)
12 self._env = {} 15 self._env = {}
13 16
14 BUILDERS = builders.BUILDERS 17 BUILDERS = builders.BUILDERS
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 'android_apk_dbg_archive': 'gs://chromium-webrtc/android_dbg', 63 'android_apk_dbg_archive': 'gs://chromium-webrtc/android_dbg',
61 'android_apk_rel_archive': 'gs://chromium-webrtc/android_rel', 64 'android_apk_rel_archive': 'gs://chromium-webrtc/android_rel',
62 'win_rel_archive': 'gs://chromium-webrtc/Win Builder', 65 'win_rel_archive': 'gs://chromium-webrtc/Win Builder',
63 'win_rel_archive_fyi': 'gs://chromium-webrtc/win_rel-fyi', 66 'win_rel_archive_fyi': 'gs://chromium-webrtc/win_rel-fyi',
64 'mac_rel_archive': 'gs://chromium-webrtc/Mac Builder', 67 'mac_rel_archive': 'gs://chromium-webrtc/Mac Builder',
65 'linux_rel_archive': 'gs://chromium-webrtc/Linux Builder', 68 'linux_rel_archive': 'gs://chromium-webrtc/Linux Builder',
66 } 69 }
67 70
68 DASHBOARD_UPLOAD_URL = 'https://chromeperf.appspot.com' 71 DASHBOARD_UPLOAD_URL = 'https://chromeperf.appspot.com'
69 72
70 def runtests(self, test_suite=None, revision=None): 73 def runtests(self, test_suite=None, revision=None, cr_revision=None):
71 """Add a suite of test steps. 74 """Add a suite of test steps.
72 75
73 Args: 76 Args:
74 test_suite: The name of the test suite. 77 test_suite: The name of the test suite.
75 revision: Revision for the build. Mandatory for perf measuring tests. 78 revision: Revision for the build. Mandatory for perf measuring tests.
79 cr_revision: Chromium revision for the build, where applicable.
76 """ 80 """
77 with self.m.step.defer_results(): 81 with self.m.step.defer_results():
78 if test_suite in ('webrtc', 'webrtc_parallel'): 82 if test_suite in ('webrtc', 'webrtc_parallel'):
79 parallel = test_suite.endswith('_parallel') 83 parallel = test_suite.endswith('_parallel')
80 for test in self.NORMAL_TESTS: 84 for test in self.NORMAL_TESTS:
81 self.add_test(test, parallel=parallel) 85 self.add_test(test, parallel=parallel)
82 86
83 if self.m.platform.is_mac and self.m.chromium.c.TARGET_BITS == 64: 87 if self.m.platform.is_mac and self.m.chromium.c.TARGET_BITS == 64:
84 test = self.m.path.join('libjingle_peerconnection_objc_test.app', 88 test = self.m.path.join('libjingle_peerconnection_objc_test.app',
85 'Contents', 'MacOS', 89 'Contents', 'MacOS',
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 Notice that the name parameter should be the same as the test executable in 173 Notice that the name parameter should be the same as the test executable in
170 order to get the stdio links in the perf dashboard to become correct. 174 order to get the stdio links in the perf dashboard to become correct.
171 """ 175 """
172 name = name or test 176 name = name or test
173 args = args or [] 177 args = args or []
174 env = env or {} 178 env = env or {}
175 if self.c.PERF_ID and perf_test: 179 if self.c.PERF_ID and perf_test:
176 perf_dashboard_id = perf_dashboard_id or test 180 perf_dashboard_id = perf_dashboard_id or test
177 assert revision, ('Revision must be specified for perf tests as they ' 181 assert revision, ('Revision must be specified for perf tests as they '
178 'upload data to the perf dashboard.') 182 'upload data to the perf dashboard.')
183 # Ensure we get the WebRTC revision passed as well for bots that builds
184 # WebRTC ToT in a Chromium checkout.
185 perf_config = self.c.PERF_CONFIG
186 if perf_config and cr_revision:
187 perf_config_dict = ast.literal_eval(self.c.PERF_CONFIG)
188 perf_config_dict['r_webrtc_rev'] = str(revision)
189 perf_config = json.dumps(perf_config_dict)
179 self.m.chromium.runtest( 190 self.m.chromium.runtest(
180 test=test, args=args, name=name, 191 test=test, args=args, name=name,
181 results_url=self.DASHBOARD_UPLOAD_URL, annotate='graphing', 192 results_url=self.DASHBOARD_UPLOAD_URL, annotate='graphing',
182 xvfb=True, perf_dashboard_id=perf_dashboard_id, test_type=test, 193 xvfb=True, perf_dashboard_id=perf_dashboard_id, test_type=test,
183 env=env, revision=revision, perf_id=self.c.PERF_ID, 194 env=env, revision=revision, perf_id=self.c.PERF_ID,
184 perf_config=self.c.PERF_CONFIG) 195 perf_config=perf_config)
185 else: 196 else:
186 annotate = 'gtest' 197 annotate = 'gtest'
187 python_mode = False 198 python_mode = False
188 test_type = test 199 test_type = test
189 if parallel: 200 if parallel:
190 test_executable = self.m.chromium.c.build_dir.join( 201 test_executable = self.m.chromium.c.build_dir.join(
191 self.m.chromium.c.build_config_fs, test) 202 self.m.chromium.c.build_config_fs, test)
192 args = [test_executable] + args 203 args = [test_executable] + args
193 test = self.m.path['checkout'].join('third_party', 'gtest-parallel', 204 test = self.m.path['checkout'].join('third_party', 'gtest-parallel',
194 'gtest-parallel') 205 'gtest-parallel')
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 if self.m.chromium.c.TARGET_PLATFORM == 'android': 272 if self.m.chromium.c.TARGET_PLATFORM == 'android':
262 self.m.chromium_android.clean_local_files() 273 self.m.chromium_android.clean_local_files()
263 else: 274 else:
264 self.m.chromium.cleanup_temp() 275 self.m.chromium.cleanup_temp()
265 276
266 def virtual_webcam_check(self): 277 def virtual_webcam_check(self):
267 self.m.python( 278 self.m.python(
268 'webcam_check', 279 'webcam_check',
269 self.m.path['build'].join('scripts', 'slave', 'webrtc', 280 self.m.path['build'].join('scripts', 'slave', 'webrtc',
270 'ensure_webcam_is_running.py')) 281 'ensure_webcam_is_running.py'))
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/webrtc/chromium.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698