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

Side by Side Diff: tools/buildbot_spec.py

Issue 1269543002: buildbot_spec.py: Add Android/ChromeOS device info, add builder_cfg dict (Closed) Base URL: https://skia.googlesource.com/skia.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
« 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 if builder_dict.get('configuration') == 'Debug': 164 if builder_dict.get('configuration') == 'Debug':
165 t.append('nanobench') 165 t.append('nanobench')
166 return t 166 return t
167 elif builder_dict['role'] == builder_name_schema.BUILDER_ROLE_PERF: 167 elif builder_dict['role'] == builder_name_schema.BUILDER_ROLE_PERF:
168 return ['nanobench'] 168 return ['nanobench']
169 else: 169 else:
170 return ['most'] 170 return ['most']
171 171
172 172
173 cov_skip.extend([lineno(), lineno() + 1]) 173 cov_skip.extend([lineno(), lineno() + 1])
174 def device_cfg(builder_dict):
borenet 2015/07/29 17:02:58 Again, this is copypasta from tools/build code.
mtklein 2015/07/29 18:07:01 Yeah, looks familiar. Glad we're moving this into
175 # Android.
176 if 'Android' in builder_dict.get('extra_config', ''):
177 if 'NoNeon' in builder_dict['extra_config']:
178 return 'arm_v7'
179 return {
180 'Arm64': 'arm64',
181 'x86': 'x86',
182 'x86_64': 'x86_64',
183 'Mips': 'mips',
184 'Mips64': 'mips64',
185 'MipsDSP2': 'mips_dsp2',
186 }.get(builder_dict['target_arch'], 'arm_v7_neon')
187 elif builder_dict.get('os') == 'Android':
188 return {
189 'GalaxyS3': 'arm_v7_neon',
190 'GalaxyS4': 'arm_v7_neon',
191 'Nexus5': 'arm_v7', # This'd be 'nexus_5', but we simulate no-NEON Clank.
192 'Nexus6': 'arm_v7_neon',
193 'Nexus7': 'nexus_7',
194 'Nexus9': 'nexus_9',
195 'Nexus10': 'nexus_10',
196 'NexusPlayer': 'x86',
197 'NVIDIA_Shield': 'arm64',
198 }[builder_dict['model']]
199
200 # ChromeOS.
201 if 'CrOS' in builder_dict.get('extra_config', ''):
202 if 'Link' in builder_dict['extra_config']:
203 return 'link'
204 if 'Daisy' in builder_dict['extra_config']:
205 return 'daisy'
206 elif builder_dict.get('os') == 'ChromeOS':
207 return {
208 'Link': 'link',
209 'Daisy': 'daisy',
210 }[builder_dict['model']]
211
212 return None
213
214
215 cov_skip.extend([lineno(), lineno() + 1])
174 def get_builder_spec(builder_name): 216 def get_builder_spec(builder_name):
175 builder_dict = builder_name_schema.DictForBuilderName(builder_name) 217 builder_dict = builder_name_schema.DictForBuilderName(builder_name)
176 env = get_extra_env_vars(builder_dict) 218 env = get_extra_env_vars(builder_dict)
177 gyp_defs = gyp_defines(builder_dict) 219 gyp_defs = gyp_defines(builder_dict)
178 gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()] 220 gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()]
179 gyp_defs_list.sort() 221 gyp_defs_list.sort()
180 env['GYP_DEFINES'] = ' '.join(gyp_defs_list) 222 env['GYP_DEFINES'] = ' '.join(gyp_defs_list)
181 return { 223 rv = {
182 'build_targets': build_targets_from_builder_dict(builder_dict), 224 'build_targets': build_targets_from_builder_dict(builder_dict),
225 'builder_cfg': builder_dict,
183 'env': env, 226 'env': env,
184 } 227 }
228 device = device_cfg(builder_dict)
229 if device:
230 rv['device_cfg'] = device
231 return rv
185 232
186 233
187 cov_end = lineno() # Don't care about code coverage past here. 234 cov_end = lineno() # Don't care about code coverage past here.
188 235
189 236
190 def self_test(): 237 def self_test():
191 import coverage # This way the bots don't need coverage.py to be installed. 238 import coverage # This way the bots don't need coverage.py to be installed.
192 args = {} 239 args = {}
193 cases = [ 240 cases = [
194 'Build-Mac10.8-Clang-Arm7-Debug-Android', 241 'Build-Mac10.8-Clang-Arm7-Debug-Android',
195 'Build-Win-MSVC-x86-Debug', 242 'Build-Win-MSVC-x86-Debug',
196 'Build-Win-MSVC-x86-Debug-GDI', 243 'Build-Win-MSVC-x86-Debug-GDI',
197 'Build-Win-MSVC-x86-Debug-Exceptions', 244 'Build-Win-MSVC-x86-Debug-Exceptions',
198 'Build-Ubuntu-GCC-Arm7-Debug-Android_FrameworkDefs', 245 'Build-Ubuntu-GCC-Arm7-Debug-Android_FrameworkDefs',
246 'Build-Ubuntu-GCC-Arm7-Debug-Android_NoNeon',
247 'Build-Ubuntu-GCC-Arm7-Debug-CrOS_Daisy',
248 'Build-Ubuntu-GCC-x86_64-Debug-CrOS_Link',
199 'Build-Ubuntu-GCC-x86_64-Release-Mesa', 249 'Build-Ubuntu-GCC-x86_64-Release-Mesa',
200 'Housekeeper-PerCommit', 250 'Housekeeper-PerCommit',
201 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', 251 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot',
252 'Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug',
253 'Test-ChromeOS-GCC-Link-CPU-AVX-x86_64-Debug',
202 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', 254 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
203 'Test-Mac10.8-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release', 255 'Test-Mac10.8-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Release',
204 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD', 256 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD',
205 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared', 257 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
206 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', 258 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
207 'Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86-Release-ANGLE', 259 'Test-Win8-MSVC-ShuttleB-GPU-HD4600-x86-Release-ANGLE',
208 'Test-Win8-MSVC-ShuttleA-CPU-AVX-x86_64-Debug', 260 'Test-Win8-MSVC-ShuttleA-CPU-AVX-x86_64-Debug',
209 ] 261 ]
210 262
211 cov = coverage.coverage() 263 cov = coverage.coverage()
(...skipping 19 matching lines...) Expand all
231 if len(sys.argv) == 2 and sys.argv[1] == 'test': 283 if len(sys.argv) == 2 and sys.argv[1] == 'test':
232 self_test() 284 self_test()
233 sys.exit(0) 285 sys.exit(0)
234 286
235 if len(sys.argv) != 3: 287 if len(sys.argv) != 3:
236 print usage 288 print usage
237 sys.exit(1) 289 sys.exit(1)
238 290
239 with open(sys.argv[1], 'w') as out: 291 with open(sys.argv[1], 'w') as out:
240 json.dump(get_builder_spec(sys.argv[2]), out) 292 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