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

Side by Side Diff: tools/buildbot_spec.py

Issue 1819033002: Support for Android Swarming bots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Skip some devices for now Created 4 years, 8 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
« no previous file with comments | « tools/buildbot_spec.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Copyright 2015 Google Inc. 2 # Copyright 2015 Google Inc.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 #!/usr/bin/env python 8 #!/usr/bin/env python
9 9
10 usage = ''' 10 usage = '''
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 elif builder_dict.get('os') == 'Android': 220 elif builder_dict.get('os') == 'Android':
221 return { 221 return {
222 'AndroidOne': 'arm_v7_neon', 222 'AndroidOne': 'arm_v7_neon',
223 'GalaxyS3': 'arm_v7_neon', 223 'GalaxyS3': 'arm_v7_neon',
224 'GalaxyS4': 'arm_v7_neon', 224 'GalaxyS4': 'arm_v7_neon',
225 'NVIDIA_Shield': 'arm64', 225 'NVIDIA_Shield': 'arm64',
226 'Nexus10': 'arm_v7_neon', 226 'Nexus10': 'arm_v7_neon',
227 'Nexus5': 'arm_v7_neon', 227 'Nexus5': 'arm_v7_neon',
228 'Nexus6': 'arm_v7_neon', 228 'Nexus6': 'arm_v7_neon',
229 'Nexus7': 'arm_v7_neon', 229 'Nexus7': 'arm_v7_neon',
230 'Nexus7v2': 'arm_v7_neon',
230 'Nexus9': 'arm64', 231 'Nexus9': 'arm64',
231 'NexusPlayer': 'x86', 232 'NexusPlayer': 'x86',
232 }[builder_dict['model']] 233 }[builder_dict['model']]
233 234
234 # ChromeOS. 235 # ChromeOS.
235 if 'CrOS' in builder_dict.get('extra_config', ''): 236 if 'CrOS' in builder_dict.get('extra_config', ''):
236 if 'Link' in builder_dict['extra_config']: 237 if 'Link' in builder_dict['extra_config']:
237 return 'link' 238 return 'link'
238 if 'Daisy' in builder_dict['extra_config']: 239 if 'Daisy' in builder_dict['extra_config']:
239 return 'daisy' 240 return 'daisy'
240 elif builder_dict.get('os') == 'ChromeOS': 241 elif builder_dict.get('os') == 'ChromeOS':
241 return { 242 return {
242 'Link': 'link', 243 'Link': 'link',
243 'Daisy': 'daisy', 244 'Daisy': 'daisy',
244 }[builder_dict['model']] 245 }[builder_dict['model']]
245 246
246 return None 247 return None
247 248
248 249
249 cov_skip.extend([lineno(), lineno() + 1]) 250 cov_skip.extend([lineno(), lineno() + 1])
251 def product_board(builder_dict):
252 if 'Android' in builder_dict.get('os', ''):
253 return {
254 'AndroidOne': None, # TODO(borenet,kjlubick)
255 'GalaxyS3': 'smdk4x12',
256 'GalaxyS4': None, # TODO(borenet,kjlubick)
257 'NVIDIA_Shield': None, # TODO(borenet,kjlubick)
258 'Nexus10': 'manta',
259 'Nexus5': 'hammerhead',
260 'Nexus6': 'shamu',
261 'Nexus7': 'grouper',
262 'Nexus7v2': 'flo',
263 'Nexus9': 'flounder',
264 'NexusPlayer': 'fugu',
265 }[builder_dict['model']]
266 return None
267
268
269 cov_skip.extend([lineno(), lineno() + 1])
250 def get_builder_spec(builder_name): 270 def get_builder_spec(builder_name):
251 builder_dict = builder_name_schema.DictForBuilderName(builder_name) 271 builder_dict = builder_name_schema.DictForBuilderName(builder_name)
252 env = get_extra_env_vars(builder_dict) 272 env = get_extra_env_vars(builder_dict)
253 gyp_defs = gyp_defines(builder_dict) 273 gyp_defs = gyp_defines(builder_dict)
254 gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()] 274 gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()]
255 gyp_defs_list.sort() 275 gyp_defs_list.sort()
256 env['GYP_DEFINES'] = ' '.join(gyp_defs_list) 276 env['GYP_DEFINES'] = ' '.join(gyp_defs_list)
257 rv = { 277 rv = {
258 'builder_cfg': builder_dict, 278 'builder_cfg': builder_dict,
259 'dm_flags': dm_flags.get_args(builder_name), 279 'dm_flags': dm_flags.get_args(builder_name),
260 'env': env, 280 'env': env,
261 'nanobench_flags': nanobench_flags.get_args(builder_name), 281 'nanobench_flags': nanobench_flags.get_args(builder_name),
262 } 282 }
263 device = device_cfg(builder_dict) 283 device = device_cfg(builder_dict)
264 if device: 284 if device:
265 rv['device_cfg'] = device 285 rv['device_cfg'] = device
286 board = product_board(builder_dict)
287 if board:
288 rv['product.board'] = board
266 289
267 role = builder_dict['role'] 290 role = builder_dict['role']
268 if role == builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: 291 if role == builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
269 configuration = CONFIG_RELEASE 292 configuration = CONFIG_RELEASE
270 else: 293 else:
271 configuration = builder_dict.get( 294 configuration = builder_dict.get(
272 'configuration', CONFIG_DEBUG) 295 'configuration', CONFIG_DEBUG)
273 arch = (builder_dict.get('arch') or builder_dict.get('target_arch')) 296 arch = (builder_dict.get('arch') or builder_dict.get('target_arch'))
274 if ('Win' in builder_dict.get('os', '') and arch == 'x86_64'): 297 if ('Win' in builder_dict.get('os', '') and arch == 'x86_64'):
275 configuration += '_x64' 298 configuration += '_x64'
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if len(sys.argv) == 2 and sys.argv[1] == 'test': 394 if len(sys.argv) == 2 and sys.argv[1] == 'test':
372 self_test() 395 self_test()
373 sys.exit(0) 396 sys.exit(0)
374 397
375 if len(sys.argv) != 3: 398 if len(sys.argv) != 3:
376 print usage 399 print usage
377 sys.exit(1) 400 sys.exit(1)
378 401
379 with open(sys.argv[1], 'w') as out: 402 with open(sys.argv[1], 'w') as out:
380 json.dump(get_builder_spec(sys.argv[2]), out) 403 json.dump(get_builder_spec(sys.argv[2]), out)
OLDNEW
« no previous file with comments | « tools/buildbot_spec.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698