OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
6 # pylint: disable=W0201 | 6 # pylint: disable=W0201 |
7 | 7 |
8 | 8 |
9 from recipe_engine import recipe_api | 9 from recipe_engine import recipe_api |
10 import os | 10 import os |
11 | 11 |
12 | 12 |
13 BOTO_CHROMIUM_SKIA_GM = 'chromium-skia-gm.boto' | 13 BOTO_CHROMIUM_SKIA_GM = 'chromium-skia-gm.boto' |
14 | 14 |
15 CONFIG_DEBUG = 'Debug' | 15 CONFIG_DEBUG = 'Debug' |
16 CONFIG_RELEASE = 'Release' | 16 CONFIG_RELEASE = 'Release' |
17 | 17 |
18 | 18 |
19 def get_gyp_defines(builder_dict): | |
20 gyp_defs = {} | |
21 | |
22 # skia_arch_type. | |
23 if builder_dict['role'] == 'Build': | |
24 arch = builder_dict['target_arch'] | |
25 elif builder_dict['role'] in ('Housekeeper', 'Infra'): | |
26 arch = None | |
27 else: | |
28 arch = builder_dict['arch'] | |
29 | |
30 arch_types = { | |
31 'x86': 'x86', | |
32 'x86_64': 'x86_64', | |
33 'Arm7': 'arm', | |
34 'Arm64': 'arm64', | |
35 'Mips': 'mips32', | |
36 'Mips64': 'mips64', | |
37 'MipsDSP2': 'mips32', | |
38 } | |
39 if arch in arch_types: | |
40 gyp_defs['skia_arch_type'] = arch_types[arch] | |
41 | |
42 # housekeeper: build shared lib. | |
43 if builder_dict['role'] == 'Housekeeper': | |
44 gyp_defs['skia_shared_lib'] = '1' | |
45 | |
46 # skia_gpu. | |
47 if builder_dict.get('cpu_or_gpu') == 'CPU': | |
48 gyp_defs['skia_gpu'] = '0' | |
49 | |
50 # skia_warnings_as_errors. | |
51 werr = False | |
52 if builder_dict['role'] == 'Build': | |
53 if 'Win' in builder_dict.get('os', ''): | |
54 if not ('GDI' in builder_dict.get('extra_config', '') or | |
55 'Exceptions' in builder_dict.get('extra_config', '')): | |
56 werr = True | |
57 elif ('Mac' in builder_dict.get('os', '') and | |
58 'Android' in builder_dict.get('extra_config', '')): | |
59 werr = False | |
60 elif 'Fast' in builder_dict.get('extra_config', ''): # pragma: no cover | |
61 # See https://bugs.chromium.org/p/skia/issues/detail?id=5257 | |
62 werr = False | |
63 else: | |
64 werr = True | |
65 gyp_defs['skia_warnings_as_errors'] = str(int(werr)) # True/False -> '1'/'0' | |
66 | |
67 # Win debugger. | |
68 if 'Win' in builder_dict.get('os', ''): | |
69 gyp_defs['skia_win_debuggers_path'] = 'c:/DbgHelp' | |
70 | |
71 # Qt SDK (Win). | |
72 if 'Win' in builder_dict.get('os', ''): | |
73 if builder_dict.get('os') == 'Win8': | |
74 gyp_defs['qt_sdk'] = 'C:/Qt/Qt5.1.0/5.1.0/msvc2012_64/' | |
75 else: | |
76 gyp_defs['qt_sdk'] = 'C:/Qt/4.8.5/' | |
77 | |
78 # ANGLE. | |
79 if builder_dict.get('extra_config') == 'ANGLE': # pragma: no cover | |
80 gyp_defs['skia_angle'] = '1' | |
81 if builder_dict.get('os', '') in ('Ubuntu', 'Linux'): | |
82 gyp_defs['use_x11'] = '1' | |
83 gyp_defs['chromeos'] = '0' | |
84 | |
85 # GDI. | |
86 if builder_dict.get('extra_config') == 'GDI': # pragma: no cover | |
87 gyp_defs['skia_gdi'] = '1' | |
88 | |
89 # Build with Exceptions on Windows. | |
90 if ('Win' in builder_dict.get('os', '') and | |
91 builder_dict.get('extra_config') == 'Exceptions'): # pragma: no cover | |
92 gyp_defs['skia_win_exceptions'] = '1' | |
93 | |
94 # iOS. | |
95 if (builder_dict.get('os') == 'iOS' or | |
96 builder_dict.get('extra_config') == 'iOS'): | |
97 gyp_defs['skia_os'] = 'ios' | |
98 | |
99 # Shared library build. | |
100 if builder_dict.get('extra_config') == 'Shared': | |
101 gyp_defs['skia_shared_lib'] = '1' | |
102 | |
103 # Build fastest Skia possible. | |
104 if builder_dict.get('extra_config') == 'Fast': # pragma: no cover | |
105 gyp_defs['skia_fast'] = '1' | |
106 | |
107 # PDF viewer in GM. | |
108 if (builder_dict.get('os') == 'Mac10.8' and | |
109 builder_dict.get('arch') == 'x86_64' and | |
110 builder_dict.get('configuration') == 'Release'): # pragma: no cover | |
111 gyp_defs['skia_run_pdfviewer_in_gm'] = '1' | |
112 | |
113 # Clang. | |
114 if builder_dict.get('compiler') == 'Clang': | |
115 gyp_defs['skia_clang_build'] = '1' | |
116 | |
117 # Valgrind. | |
118 if 'Valgrind' in builder_dict.get('extra_config', ''): | |
119 gyp_defs['skia_release_optimization_level'] = '1' | |
120 | |
121 # Link-time code generation just wastes time on compile-only bots. | |
122 if (builder_dict.get('role') == 'Build' and | |
123 builder_dict.get('compiler') == 'MSVC'): | |
124 gyp_defs['skia_win_ltcg'] = '0' | |
125 | |
126 # Mesa. | |
127 if (builder_dict.get('extra_config') == 'Mesa' or | |
128 builder_dict.get('cpu_or_gpu_value') == 'Mesa'): # pragma: no cover | |
129 gyp_defs['skia_mesa'] = '1' | |
130 | |
131 # skia_use_android_framework_defines. | |
132 if builder_dict.get('extra_config') == 'Android_FrameworkDefs': | |
133 gyp_defs['skia_use_android_framework_defines'] = '1' # pragma: no cover | |
134 | |
135 # Skia dump stats for perf tests and gpu | |
136 if (builder_dict.get('cpu_or_gpu') == 'GPU' and | |
137 builder_dict.get('role') == 'Perf'): | |
138 gyp_defs['skia_dump_stats'] = '1' | |
139 | |
140 # CommandBuffer. | |
141 if builder_dict.get('extra_config') == 'CommandBuffer': | |
142 gyp_defs['skia_command_buffer'] = '1' | |
143 | |
144 # Vulkan. | |
145 if builder_dict.get('extra_config') == 'Vulkan': | |
146 gyp_defs['skia_vulkan'] = '1' | |
147 gyp_defs['skia_vulkan_debug_layers'] = '0' | |
148 | |
149 return gyp_defs | |
150 | |
151 | |
152 def get_extra_env_vars(builder_dict): | |
153 env = {} | |
154 if builder_dict.get('compiler') == 'Clang': | |
155 env['CC'] = '/usr/bin/clang' | |
156 env['CXX'] = '/usr/bin/clang++' | |
157 | |
158 # SKNX_NO_SIMD, SK_USE_DISCARDABLE_SCALEDIMAGECACHE, etc. | |
159 extra_config = builder_dict.get('extra_config', '') | |
160 if extra_config.startswith('SK') and extra_config.isupper(): | |
161 env['CPPFLAGS'] = '-D' + extra_config # pragma: no cover | |
162 | |
163 return env | |
164 | |
165 | |
166 def build_targets_from_builder_dict(builder_dict): | |
167 """Return a list of targets to build, depending on the builder type.""" | |
168 if builder_dict.get('extra_config') == 'iOS': | |
169 return ['iOSShell'] | |
170 if 'SAN' in builder_dict.get('extra_config', ''): | |
171 # 'most' does not compile under MSAN. | |
172 return ['dm', 'nanobench'] | |
173 else: | |
174 return ['most'] | |
175 | |
176 | |
177 def device_cfg(builder_dict): | 19 def device_cfg(builder_dict): |
178 # Android. | 20 # Android. |
179 if 'Android' in builder_dict.get('extra_config', ''): | 21 if 'Android' in builder_dict.get('extra_config', ''): |
180 if 'NoNeon' in builder_dict['extra_config']: # pragma: no cover | 22 if 'NoNeon' in builder_dict['extra_config']: # pragma: no cover |
181 return 'arm_v7' | 23 return 'arm_v7' |
182 return { | 24 return { |
183 'Arm64': 'arm64', | 25 'Arm64': 'arm64', |
184 'x86': 'x86', | 26 'x86': 'x86', |
185 'x86_64': 'x86_64', | 27 'x86_64': 'x86_64', |
186 'Mips': 'mips', | 28 'Mips': 'mips', |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 'Nexus5': 'hammerhead', | 64 'Nexus5': 'hammerhead', |
223 'Nexus6': 'shamu', | 65 'Nexus6': 'shamu', |
224 'Nexus7': 'grouper', | 66 'Nexus7': 'grouper', |
225 'Nexus7v2': 'flo', | 67 'Nexus7v2': 'flo', |
226 'Nexus9': 'flounder', | 68 'Nexus9': 'flounder', |
227 'NexusPlayer': 'fugu', | 69 'NexusPlayer': 'fugu', |
228 }[builder_dict['model']] | 70 }[builder_dict['model']] |
229 return None | 71 return None |
230 | 72 |
231 | 73 |
232 def dm_flags(bot): | |
233 args = [] | |
234 | |
235 # 32-bit desktop bots tend to run out of memory, because they have relatively | |
236 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. | |
237 if '-x86-' in bot and not 'NexusPlayer' in bot: | |
238 args.extend('--threads 4'.split(' ')) | |
239 | |
240 # These are the canonical configs that we would ideally run on all bots. We | |
241 # may opt out or substitute some below for specific bots | |
242 configs = ['565', '8888', 'gpu', 'gpusrgb', 'pdf'] | |
243 # Add in either msaa4 or msaa16 to the canonical set of configs to run | |
244 if 'Android' in bot or 'iOS' in bot: | |
245 configs.append('msaa4') | |
246 else: | |
247 configs.append('msaa16') | |
248 | |
249 # With msaa, the S4 crashes and the NP produces a long error stream when we | |
250 # run with MSAA. The Tegra2 and Tegra3 just don't support it. No record of | |
251 # why we're not running msaa on iOS, probably started with gpu config and just | |
252 # haven't tried. | |
253 if ('GalaxyS4' in bot or | |
254 'NexusPlayer' in bot or | |
255 'Tegra3' in bot or | |
256 'iOS' in bot): | |
257 configs = [x for x in configs if 'msaa' not in x] | |
258 | |
259 # Runs out of memory on Android bots and Daisy. Everyone else seems fine. | |
260 if 'Android' in bot or 'Daisy' in bot: | |
261 configs.remove('pdf') | |
262 | |
263 if '-GCE-' in bot: | |
264 configs.extend(['f16', 'srgb']) # Gamma-correct formats. | |
265 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture. | |
266 | |
267 if '-TSAN' not in bot: | |
268 if ('TegraK1' in bot or | |
269 'TegraX1' in bot or | |
270 'GTX550Ti' in bot or | |
271 'GTX660' in bot or | |
272 'GT610' in bot): | |
273 if 'Android' in bot: | |
274 configs.append('nvprdit4') | |
275 else: | |
276 configs.append('nvprdit16') | |
277 | |
278 # We want to test the OpenGL config not the GLES config on the X1 | |
279 if 'TegraX1' in bot: | |
280 configs = [x.replace('gpu', 'gl') for x in configs] | |
281 configs = [x.replace('msaa', 'glmsaa') for x in configs] | |
282 configs = [x.replace('nvpr', 'glnvpr') for x in configs] | |
283 | |
284 # NP is running out of RAM when we run all these modes. skia:3255 | |
285 if 'NexusPlayer' not in bot: | |
286 configs.extend(mode + '-8888' for mode in | |
287 ['serialize', 'tiles_rt', 'pic']) | |
288 | |
289 if 'ANGLE' in bot: # pragma: no cover | |
290 configs.append('angle') | |
291 | |
292 # We want to run gpudft on atleast the mali 400 | |
293 if 'GalaxyS3' in bot: | |
294 configs.append('gpudft') | |
295 | |
296 # Test instanced rendering on a limited number of platforms | |
297 if 'Nexus6' in bot: # pragma: no cover | |
298 configs.append('esinst') # esinst4 isn't working yet on Adreno. | |
299 elif 'TegraX1' in bot: | |
300 # Multisampled instanced configs use nvpr. | |
301 configs = [x.replace('glnvpr', 'glinst') for x in configs] | |
302 configs.append('glinst') | |
303 elif 'MacMini6.2' in bot: | |
304 configs.extend(['glinst', 'glinst16']) | |
305 | |
306 # CommandBuffer bot *only* runs the command_buffer config. | |
307 if 'CommandBuffer' in bot: | |
308 configs = ['commandbuffer'] | |
309 | |
310 # Vulkan bot *only* runs the vk config. | |
311 if 'Vulkan' in bot: | |
312 configs = ['vk'] | |
313 | |
314 args.append('--config') | |
315 args.extend(configs) | |
316 | |
317 # Run tests, gms, and image decoding tests everywhere. | |
318 args.extend('--src tests gm image colorImage'.split(' ')) | |
319 | |
320 if 'GalaxyS' in bot: | |
321 args.extend(('--threads', '0')) | |
322 | |
323 blacklist = [] | |
324 | |
325 # TODO: ??? | |
326 blacklist.extend('f16 _ _ dstreadshuffle'.split(' ')) | |
327 blacklist.extend('f16 image _ _'.split(' ')) | |
328 blacklist.extend('srgb image _ _'.split(' ')) | |
329 blacklist.extend('gpusrgb image _ _'.split(' ')) | |
330 | |
331 if 'Valgrind' in bot: | |
332 # These take 18+ hours to run. | |
333 blacklist.extend('pdf gm _ fontmgr_iter'.split(' ')) | |
334 blacklist.extend('pdf _ _ PANO_20121023_214540.jpg'.split(' ')) | |
335 blacklist.extend('pdf skp _ worldjournal'.split(' ')) | |
336 blacklist.extend('pdf skp _ desk_baidu.skp'.split(' ')) | |
337 blacklist.extend('pdf skp _ desk_wikipedia.skp'.split(' ')) | |
338 | |
339 if 'iOS' in bot: | |
340 blacklist.extend('gpu skp _ _ msaa skp _ _'.split(' ')) | |
341 blacklist.extend('msaa16 gm _ tilemodesProcess'.split(' ')) | |
342 | |
343 if 'Mac' in bot or 'iOS' in bot: | |
344 # CG fails on questionable bmps | |
345 blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) | |
346 blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) | |
347 blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) | |
348 blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) | |
349 blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) | |
350 blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) | |
351 blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) | |
352 | |
353 # CG has unpredictable behavior on this questionable gif | |
354 # It's probably using uninitialized memory | |
355 blacklist.extend('_ image gen_platf frame_larger_than_image.gif'.split(' ')) | |
356 | |
357 # WIC fails on questionable bmps | |
358 if 'Win' in bot: | |
359 blacklist.extend('_ image gen_platf rle8-height-negative.bmp'.split(' ')) | |
360 blacklist.extend('_ image gen_platf rle4-height-negative.bmp'.split(' ')) | |
361 blacklist.extend('_ image gen_platf pal8os2v2.bmp'.split(' ')) | |
362 blacklist.extend('_ image gen_platf pal8os2v2-16.bmp'.split(' ')) | |
363 blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) | |
364 blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) | |
365 blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) | |
366 blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) | |
367 blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) | |
368 blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) | |
369 blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) | |
370 if 'x86_64' in bot and 'CPU' in bot: | |
371 # This GM triggers a SkSmallAllocator assert. | |
372 blacklist.extend('_ gm _ composeshader_bitmap'.split(' ')) | |
373 | |
374 if 'Android' in bot or 'iOS' in bot: | |
375 # This test crashes the N9 (perhaps because of large malloc/frees). It also | |
376 # is fairly slow and not platform-specific. So we just disable it on all of | |
377 # Android and iOS. skia:5438 | |
378 blacklist.extend('_ test _ GrShape'.split(' ')) | |
379 | |
380 if 'Win8' in bot: | |
381 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with | |
382 # 'Unexpected error' from DirectWrite" | |
383 blacklist.extend('_ gm _ fontscalerdistortable'.split(' ')) | |
384 | |
385 # skia:4095 | |
386 bad_serialize_gms = ['bleed_image', | |
387 'c_gms', | |
388 'colortype', | |
389 'colortype_xfermodes', | |
390 'drawfilter', | |
391 'fontmgr_bounds_0.75_0', | |
392 'fontmgr_bounds_1_-0.25', | |
393 'fontmgr_bounds', | |
394 'fontmgr_match', | |
395 'fontmgr_iter'] | |
396 | |
397 # skia:5589 | |
398 bad_serialize_gms.extend(['bitmapfilters', | |
399 'bitmapshaders', | |
400 'bleed', | |
401 'bleed_alpha_bmp', | |
402 'bleed_alpha_bmp_shader', | |
403 'convex_poly_clip', | |
404 'extractalpha', | |
405 'filterbitmap_checkerboard_32_32_g8', | |
406 'filterbitmap_image_mandrill_64', | |
407 'shadows', | |
408 'simpleaaclip_aaclip']) | |
409 # skia:5595 | |
410 bad_serialize_gms.extend(['composeshader_bitmap', | |
411 'scaled_tilemodes_npot', | |
412 'scaled_tilemodes']) | |
413 for test in bad_serialize_gms: | |
414 blacklist.extend(['serialize-8888', 'gm', '_', test]) | |
415 | |
416 if 'Mac' not in bot: | |
417 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']: | |
418 blacklist.extend(['serialize-8888', 'gm', '_', test]) | |
419 # It looks like we skip these only for out-of-memory concerns. | |
420 if 'Win' in bot or 'Android' in bot: | |
421 for test in ['verylargebitmap', 'verylarge_picture_image']: | |
422 blacklist.extend(['serialize-8888', 'gm', '_', test]) | |
423 | |
424 # skia:4769 | |
425 for test in ['drawfilter']: | |
426 blacklist.extend([ 'sp-8888', 'gm', '_', test]) | |
427 blacklist.extend([ 'pic-8888', 'gm', '_', test]) | |
428 blacklist.extend(['2ndpic-8888', 'gm', '_', test]) | |
429 # skia:4703 | |
430 for test in ['image-cacherator-from-picture', | |
431 'image-cacherator-from-raster', | |
432 'image-cacherator-from-ctable']: | |
433 blacklist.extend([ 'sp-8888', 'gm', '_', test]) | |
434 blacklist.extend([ 'pic-8888', 'gm', '_', test]) | |
435 blacklist.extend([ '2ndpic-8888', 'gm', '_', test]) | |
436 blacklist.extend(['serialize-8888', 'gm', '_', test]) | |
437 | |
438 # Extensions for RAW images | |
439 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", | |
440 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"] | |
441 | |
442 # skbug.com/4888 | |
443 # Blacklist RAW images (and a few large PNGs) on GPU bots | |
444 # until we can resolve failures | |
445 if 'GPU' in bot: | |
446 blacklist.extend('_ image _ interlaced1.png'.split(' ')) | |
447 blacklist.extend('_ image _ interlaced2.png'.split(' ')) | |
448 blacklist.extend('_ image _ interlaced3.png'.split(' ')) | |
449 for raw_ext in r: | |
450 blacklist.extend(('_ image _ .%s' % raw_ext).split(' ')) | |
451 | |
452 if 'Nexus9' in bot: # pragma: no cover | |
453 for raw_ext in r: | |
454 blacklist.extend(('_ image _ .%s' % raw_ext).split(' ')) | |
455 | |
456 # Large image that overwhelms older Mac bots | |
457 if 'MacMini4.1-GPU' in bot: # pragma: no cover | |
458 blacklist.extend('_ image _ abnormal.wbmp'.split(' ')) | |
459 blacklist.extend(['msaa16', 'gm', '_', 'blurcircles']) | |
460 | |
461 match = [] | |
462 if 'Valgrind' in bot: # skia:3021 | |
463 match.append('~Threaded') | |
464 | |
465 if 'GalaxyS3' in bot: # skia:1699 | |
466 match.append('~WritePixels') | |
467 | |
468 if 'AndroidOne' in bot: # skia:4711 | |
469 match.append('~WritePixels') # pragma: no cover | |
470 | |
471 if 'NexusPlayer' in bot: # pragma: no cover | |
472 match.append('~ResourceCache') | |
473 | |
474 if 'Nexus10' in bot: # skia:5509 | |
475 match.append('~CopySurface') # pragma: no cover | |
476 | |
477 if 'ANGLE' in bot and 'Debug' in bot: # pragma: no cover | |
478 match.append('~GLPrograms') # skia:4717 | |
479 | |
480 if 'MSAN' in bot: | |
481 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests. | |
482 | |
483 if 'TSAN' in bot: # pragma: no cover | |
484 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots. | |
485 | |
486 if blacklist: | |
487 args.append('--blacklist') | |
488 args.extend(blacklist) | |
489 | |
490 if match: | |
491 args.append('--match') | |
492 args.extend(match) | |
493 | |
494 # These bots run out of memory running RAW codec tests. Do not run them in | |
495 # parallel | |
496 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot | |
497 or 'Win8-MSVC-ShuttleB' in bot): | |
498 args.append('--noRAW_threading') | |
499 | |
500 return args | |
501 | |
502 | |
503 def get_builder_spec(api, builder_name): | 74 def get_builder_spec(api, builder_name): |
504 builder_dict = api.builder_name_schema.DictForBuilderName(builder_name) | 75 builder_dict = api.builder_name_schema.DictForBuilderName(builder_name) |
505 env = get_extra_env_vars(builder_dict) | |
506 gyp_defs = get_gyp_defines(builder_dict) | |
507 gyp_defs_list = ['%s=%s' % (k, v) for k, v in gyp_defs.iteritems()] | |
508 gyp_defs_list.sort() | |
509 env['GYP_DEFINES'] = ' '.join(gyp_defs_list) | |
510 | |
511 build_targets = build_targets_from_builder_dict(builder_dict) | |
512 rv = { | 76 rv = { |
513 'build_targets': build_targets, | |
514 'builder_cfg': builder_dict, | 77 'builder_cfg': builder_dict, |
515 'dm_flags': dm_flags(builder_name), | |
516 'env': env, | |
517 'nanobench_flags': nanobench_flags(builder_name), | |
518 } | 78 } |
519 device = device_cfg(builder_dict) | 79 device = device_cfg(builder_dict) |
520 if device: | 80 if device: |
521 rv['device_cfg'] = device | 81 rv['device_cfg'] = device |
522 board = product_board(builder_dict) | 82 board = product_board(builder_dict) |
523 if board: | 83 if board: |
524 rv['product.board'] = board | 84 rv['product.board'] = board |
525 | 85 |
526 role = builder_dict['role'] | 86 role = builder_dict['role'] |
527 if role == api.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: | 87 if role == api.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER: |
(...skipping 28 matching lines...) Expand all Loading... |
556 upload_dm_results = True | 116 upload_dm_results = True |
557 for s in skip_upload_bots: | 117 for s in skip_upload_bots: |
558 if s in builder_name: | 118 if s in builder_name: |
559 upload_dm_results = False | 119 upload_dm_results = False |
560 break | 120 break |
561 rv['upload_dm_results'] = upload_dm_results | 121 rv['upload_dm_results'] = upload_dm_results |
562 | 122 |
563 return rv | 123 return rv |
564 | 124 |
565 | 125 |
566 def nanobench_flags(bot): | |
567 args = ['--pre_log'] | |
568 | |
569 if 'GPU' in bot: | |
570 args.append('--images') | |
571 args.extend(['--gpuStatsDump', 'true']) | |
572 | |
573 if 'Android' in bot and 'GPU' in bot: | |
574 args.extend(['--useThermalManager', '1,1,10,1000']) | |
575 | |
576 args.extend(['--scales', '1.0', '1.1']) | |
577 | |
578 if 'iOS' in bot: | |
579 args.extend(['--skps', 'ignore_skps']) | |
580 | |
581 config = ['565', '8888', 'gpu', 'nonrendering', 'angle', 'hwui' ] | |
582 config += [ 'f16', 'srgb' ] | |
583 # The S4 crashes and the NP produces a long error stream when we run with | |
584 # MSAA. | |
585 if ('GalaxyS4' not in bot and | |
586 'NexusPlayer' not in bot): | |
587 if 'Android' in bot: | |
588 # The TegraX1 has a regular OpenGL implementation. We bench that instead | |
589 # of ES. | |
590 if 'TegraX1' in bot: | |
591 config.remove('gpu') | |
592 config.extend(['gl', 'glmsaa4', 'glnvpr4', 'glnvprdit4']) | |
593 else: | |
594 config.extend(['msaa4', 'nvpr4', 'nvprdit4']) | |
595 else: | |
596 config.extend(['msaa16', 'nvpr16', 'nvprdit16']) | |
597 | |
598 # Bench instanced rendering on a limited number of platforms | |
599 if 'Nexus6' in bot: # pragma: no cover | |
600 config.append('esinst') # esinst4 isn't working yet on Adreno. | |
601 elif 'TegraX1' in bot: | |
602 config.extend(['glinst', 'glinst4']) | |
603 elif 'MacMini6.2' in bot: | |
604 config.extend(['glinst', 'glinst16']) | |
605 | |
606 if 'Vulkan' in bot: | |
607 config = ['vk'] | |
608 | |
609 args.append('--config') | |
610 args.extend(config) | |
611 | |
612 if 'Valgrind' in bot: | |
613 # Don't care about Valgrind performance. | |
614 args.extend(['--loops', '1']) | |
615 args.extend(['--samples', '1']) | |
616 # Ensure that the bot framework does not think we have timed out. | |
617 args.extend(['--keepAlive', 'true']) | |
618 | |
619 match = [] | |
620 if 'Android' in bot: | |
621 # Segfaults when run as GPU bench. Very large texture? | |
622 match.append('~blurroundrect') | |
623 match.append('~patch_grid') # skia:2847 | |
624 match.append('~desk_carsvg') | |
625 if 'NexusPlayer' in bot: # pragma: no cover | |
626 match.append('~desk_unicodetable') | |
627 if 'Nexus5' in bot: # pragma: no cover | |
628 match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178 | |
629 if 'iOS' in bot: | |
630 match.append('~blurroundrect') | |
631 match.append('~patch_grid') # skia:2847 | |
632 match.append('~desk_carsvg') | |
633 match.append('~keymobi') | |
634 match.append('~path_hairline') | |
635 match.append('~GLInstancedArraysBench') # skia:4714 | |
636 | |
637 # the 32-bit GCE bots run out of memory in DM when running these large images | |
638 # so defensively disable them in nanobench, too. | |
639 # FIXME (scroggo): This may have just been due to SkImageDecoder's | |
640 # buildTileIndex leaking memory (https://bug.skia.org/4360). That is | |
641 # disabled by default for nanobench, so we may not need this. | |
642 # FIXME (scroggo): Share image blacklists between dm and nanobench? | |
643 if 'x86' in bot and not 'x86-64' in bot: | |
644 match.append('~interlaced1.png') | |
645 match.append('~interlaced2.png') | |
646 match.append('~interlaced3.png') | |
647 | |
648 # This low-end Android bot crashes about 25% of the time while running the | |
649 # (somewhat intense) shapes benchmarks. | |
650 if 'Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Release' in bot: | |
651 match.append('~shapes_') # pragma: no cover | |
652 | |
653 # We do not need or want to benchmark the decodes of incomplete images. | |
654 # In fact, in nanobench we assert that the full image decode succeeds. | |
655 match.append('~inc0.gif') | |
656 match.append('~inc1.gif') | |
657 match.append('~incInterlaced.gif') | |
658 match.append('~inc0.jpg') | |
659 match.append('~incGray.jpg') | |
660 match.append('~inc0.wbmp') | |
661 match.append('~inc1.wbmp') | |
662 match.append('~inc0.webp') | |
663 match.append('~inc1.webp') | |
664 match.append('~inc0.ico') | |
665 match.append('~inc1.ico') | |
666 match.append('~inc0.png') | |
667 match.append('~inc1.png') | |
668 match.append('~inc2.png') | |
669 match.append('~inc12.png') | |
670 match.append('~inc13.png') | |
671 match.append('~inc14.png') | |
672 match.append('~inc0.webp') | |
673 match.append('~inc1.webp') | |
674 | |
675 if match: | |
676 args.append('--match') | |
677 args.extend(match) | |
678 | |
679 return args | |
680 | |
681 | |
682 class SkiaVarsApi(recipe_api.RecipeApi): | 126 class SkiaVarsApi(recipe_api.RecipeApi): |
683 | 127 |
684 def make_path(self, *path): | 128 def make_path(self, *path): |
685 """Return a Path object for the given path.""" | 129 """Return a Path object for the given path.""" |
686 key = 'custom_%s' % '_'.join(path) | 130 key = 'custom_%s' % '_'.join(path) |
687 self.m.path.c.base_paths[key] = tuple(path) | 131 self.m.path.c.base_paths[key] = tuple(path) |
688 return self.m.path[key] | 132 return self.m.path[key] |
689 | 133 |
690 def gsutil_env(self, boto_file): | 134 def gsutil_env(self, boto_file): |
691 """Environment variables for gsutil.""" | 135 """Environment variables for gsutil.""" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 if self.is_trybot: | 241 if self.is_trybot: |
798 self.issue = self.m.properties['issue'] | 242 self.issue = self.m.properties['issue'] |
799 self.patchset = self.m.properties['patchset'] | 243 self.patchset = self.m.properties['patchset'] |
800 self.rietveld = self.m.properties['rietveld'] | 244 self.rietveld = self.m.properties['rietveld'] |
801 self.upload_dm_results = self.builder_spec['upload_dm_results'] | 245 self.upload_dm_results = self.builder_spec['upload_dm_results'] |
802 self.upload_perf_results = self.builder_spec['upload_perf_results'] | 246 self.upload_perf_results = self.builder_spec['upload_perf_results'] |
803 self.dm_dir = self.m.path.join( | 247 self.dm_dir = self.m.path.join( |
804 self.swarming_out_dir, 'dm') | 248 self.swarming_out_dir, 'dm') |
805 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, | 249 self.perf_data_dir = self.m.path.join(self.swarming_out_dir, |
806 'perfdata', self.builder_name, 'data') | 250 'perfdata', self.builder_name, 'data') |
OLD | NEW |