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

Side by Side Diff: scripts/slave/recipes/cronet.py

Issue 1292783004: Run Cronet perf test on Cronet bot Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 from infra.libs.infra_types import freeze 5 from infra.libs.infra_types import freeze
6 6
7 DEPS = [ 7 DEPS = [
8 'chromium',
8 'cronet', 9 'cronet',
9 'path', 10 'path',
10 'properties', 11 'properties',
11 ] 12 ]
12 13
13 BUILDERS = freeze({ 14 BUILDERS = freeze({
14 'local_test': { 15 'local_test': {
15 'recipe_config': 'main_builder', 16 'recipe_config': 'main_builder',
16 'run_tests': True, 17 'run_tests': True,
17 'kwargs': { 18 'kwargs': {
(...skipping 14 matching lines...) Expand all
32 'kwargs': { 33 'kwargs': {
33 'BUILD_CONFIG': 'Debug', 34 'BUILD_CONFIG': 'Debug',
34 }, 35 },
35 'cronet_kwargs': { 36 'cronet_kwargs': {
36 'PERF_ID': 'android_cronet_builder_dbg', 37 'PERF_ID': 'android_cronet_builder_dbg',
37 }, 38 },
38 }, 39 },
39 'Android Cronet Builder': { 40 'Android Cronet Builder': {
40 'recipe_config': 'main_builder', 41 'recipe_config': 'main_builder',
41 'run_tests': True, 42 'run_tests': True,
43 'run_perf_tests': True,
42 'kwargs': { 44 'kwargs': {
43 'BUILD_CONFIG': 'Release', 45 'BUILD_CONFIG': 'Release',
44 'REPO_NAME': 'src', 46 'REPO_NAME': 'src',
45 }, 47 },
46 'cronet_kwargs': { 48 'cronet_kwargs': {
47 'PERF_ID': 'android_cronet_builder', 49 'PERF_ID': 'android_cronet_builder',
48 }, 50 },
49 }, 51 },
50 'Android Cronet ARMv6 Builder': { 52 'Android Cronet ARMv6 Builder': {
51 'recipe_config': 'main_builder', 53 'recipe_config': 'main_builder',
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 cronet_kwargs = builder_config.get('cronet_kwargs', {}) 135 cronet_kwargs = builder_config.get('cronet_kwargs', {})
134 gyp_defs = builder_config.get('gyp_defs', {}) 136 gyp_defs = builder_config.get('gyp_defs', {})
135 137
136 api.cronet.init_and_sync(recipe_config, kwargs, gyp_defs) 138 api.cronet.init_and_sync(recipe_config, kwargs, gyp_defs)
137 api.cronet.build() 139 api.cronet.build()
138 140
139 if cronet_kwargs['PERF_ID']: 141 if cronet_kwargs['PERF_ID']:
140 api.cronet.sizes(cronet_kwargs['PERF_ID']) 142 api.cronet.sizes(cronet_kwargs['PERF_ID'])
141 if builder_config['run_tests']: 143 if builder_config['run_tests']:
142 api.cronet.run_tests(kwargs['BUILD_CONFIG']) 144 api.cronet.run_tests(kwargs['BUILD_CONFIG'])
145 if 'run_perf_tests' in builder_config and builder_config['run_perf_tests']:
xunjieli 2015/08/17 14:58:05 Why do we run perf tests only on "Android Cronet B
146 # Before running the perf test, build quic_server and quic_client for this
147 # host machine.
148 api.chromium.set_config('chromium')
149 # Make sure not to clobber all the Cronet binaries that were just built.
150 # Landmines are very target dependent so they'll likely be different
151 # between android and linux, so running runhooks now would make them go off.
152 # Prevent clobbering by clearing landmines that would otherwise go off
153 # when runhooks is run. It's safe to ignore landmines now because we just
154 # did a clobber build.
155 api.cronet.clear_landmines()
156 api.chromium.runhooks()
xunjieli 2015/08/17 14:58:05 Suggest adding a name argument here, so it's clear
157 api.chromium.compile(targets=['quic_server', 'quic_client'])
158
159 api.cronet.run_perf_tests()
143 160
144 161
145 def _sanitize_nonalpha(text): 162 def _sanitize_nonalpha(text):
146 return ''.join(c if c.isalnum() else '_' for c in text.lower()) 163 return ''.join(c if c.isalnum() else '_' for c in text.lower())
147 164
148 165
149 def GenTests(api): 166 def GenTests(api):
150 for bot_id in BUILDERS.keys(): 167 for bot_id in BUILDERS.keys():
151 props = api.properties.generic( 168 props = api.properties.generic(
152 buildername=bot_id, 169 buildername=bot_id,
153 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00', 170 revision='4f4b02f6b7fa20a3a25682c457bbc8ad589c8a00',
154 repository='https://chromium.googlesource.com/chromium/src', 171 repository='https://chromium.googlesource.com/chromium/src',
155 branch='master', 172 branch='master',
156 project='src', 173 project='src',
157 ) 174 )
158 yield api.test(_sanitize_nonalpha(bot_id)) + props 175 yield api.test(_sanitize_nonalpha(bot_id)) + props
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/cronet/api.py ('k') | scripts/slave/recipes/cronet.expected/android_cronet_arm64_builder.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698