blob: 36575aa750704324c9fd6c1193e8721550136486 [file] [log] [blame]
borenet1ed2ae42016-07-26 11:52:17 -07001# Copyright 2016 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6# Recipe module for Skia Swarming test.
7
8
9DEPS = [
Eric Boren4c7754c2017-04-10 08:19:10 -040010 'build/file',
11 'core',
12 'recipe_engine/json',
borenet1ed2ae42016-07-26 11:52:17 -070013 'recipe_engine/path',
14 'recipe_engine/platform',
15 'recipe_engine/properties',
Eric Boren4c7754c2017-04-10 08:19:10 -040016 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070017 'recipe_engine/raw_io',
Eric Boren4c7754c2017-04-10 08:19:10 -040018 'recipe_engine/step',
19 'flavor',
20 'run',
21 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070022]
23
24
Eric Boren4c7754c2017-04-10 08:19:10 -040025def dm_flags(bot):
26 args = []
27
28 # This enables non-deterministic random seeding of the GPU FP optimization
29 # test. Limit testing until we're sure it's not going to cause an
30 # avalanche of problems.
31 if 'Ubuntu' in bot or 'Win' in bot or 'Mac' in bot or 'iOS' in bot:
32 args.append('--randomProcessorTest')
33
34 # 32-bit desktop bots tend to run out of memory, because they have relatively
35 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
36 if '-x86-' in bot and not 'NexusPlayer' in bot:
37 args.extend('--threads 4'.split(' '))
38
39 # Avoid issues with dynamically exceeding resource cache limits.
40 if 'Test' in bot and 'DISCARDABLE' in bot:
41 args.extend('--threads 0'.split(' '))
42
43 # These are the canonical configs that we would ideally run on all bots. We
44 # may opt out or substitute some below for specific bots
45 configs = ['8888', 'srgb', 'pdf']
46 # Add in either gles or gl configs to the canonical set based on OS
47 sample_count = '8'
48 gl_prefix = 'gl'
49 if 'Android' in bot or 'iOS' in bot:
50 sample_count = '4'
51 # We want to test the OpenGL config not the GLES config on the Shield
52 if 'NVIDIA_Shield' not in bot:
53 gl_prefix = 'gles'
54 elif 'Intel' in bot:
55 sample_count = ''
56 elif 'ChromeOS' in bot:
57 gl_prefix = 'gles'
58
59 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
60 if sample_count is not '':
61 configs.append(gl_prefix + 'msaa' + sample_count)
62
63 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
64 # doesn't support it.
65 if ('NexusPlayer' in bot or
66 'Tegra3' in bot or
67 # We aren't interested in fixing msaa bugs on iPad4.
68 'iPad4' in bot or
69 # skia:5792
70 'iHD530' in bot or
71 'IntelIris540' in bot):
72 configs = [x for x in configs if 'msaa' not in x]
73
74 # The NP produces different images for dft on every run.
75 if 'NexusPlayer' in bot:
76 configs = [x for x in configs if 'dft' not in x]
77
78 # Runs out of memory on Android bots. Everyone else seems fine.
79 if 'Android' in bot:
80 configs.remove('pdf')
81
82 if '-GCE-' in bot:
83 configs.extend(['565'])
84 configs.extend(['f16'])
85 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
86 configs.extend(['lite-8888']) # Experimental display list.
87 configs.extend(['gbr-8888'])
88
89 if '-TSAN' not in bot and sample_count is not '':
90 if ('TegraK1' in bot or
91 'TegraX1' in bot or
92 'GTX550Ti' in bot or
93 'GTX660' in bot or
94 'GT610' in bot):
95 configs.append(gl_prefix + 'nvprdit' + sample_count)
96
97 # We want to test both the OpenGL config and the GLES config on Linux Intel:
98 # GL is used by Chrome, GLES is used by ChromeOS.
99 if 'Intel' in bot and 'Ubuntu' in bot:
100 configs.extend(['gles', 'glesdft', 'glessrgb'])
101
102 # NP is running out of RAM when we run all these modes. skia:3255
103 if 'NexusPlayer' not in bot:
104 configs.extend(mode + '-8888' for mode in
105 ['serialize', 'tiles_rt', 'pic'])
106
107 # Test instanced rendering on a limited number of platforms
108 if 'Nexus6' in bot:
109 configs.append(gl_prefix + 'inst') # inst msaa isn't working yet on Adreno.
110 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
111 # Multisampled instanced configs use nvpr so we substitute inst msaa
112 # configs for nvpr msaa configs.
113 old = gl_prefix + 'nvpr'
114 new = gl_prefix + 'inst'
115 configs = [x.replace(old, new) for x in configs]
116 # We also test non-msaa instanced.
117 configs.append(new)
118 elif 'MacMini6.2' in bot and sample_count is not '':
119 configs.extend([gl_prefix + 'inst', gl_prefix + 'inst' + sample_count])
120
121 # CommandBuffer bot *only* runs the command_buffer config.
122 if 'CommandBuffer' in bot:
123 configs = ['commandbuffer']
124
125 # ANGLE bot *only* runs the angle configs
126 if 'ANGLE' in bot:
127 configs = ['angle_d3d11_es2',
128 'angle_d3d9_es2',
129 'angle_gl_es2']
130 if sample_count is not '':
131 configs.append('angle_d3d11_es2_msaa' + sample_count)
132
133 # Vulkan bot *only* runs the vk config.
134 if 'Vulkan' in bot:
135 configs = ['vk']
136
137 if 'ChromeOS' in bot:
138 # Just run GLES for now - maybe add gles_msaa4 in the future
139 configs = ['gles']
140
141 args.append('--config')
142 args.extend(configs)
143
144 # Run tests, gms, and image decoding tests everywhere.
145 args.extend('--src tests gm image colorImage svg'.split(' '))
146 if 'Vulkan' in bot and 'NexusPlayer' in bot:
147 args.remove('svg')
148 args.remove('image')
149
150 blacklisted = []
151 def blacklist(quad):
152 config, src, options, name = quad.split(' ') if type(quad) is str else quad
153 if config == '_' or config in configs:
154 blacklisted.extend([config, src, options, name])
155
156 # TODO: ???
157 blacklist('f16 _ _ dstreadshuffle')
158 blacklist('glsrgb image _ _')
159 blacklist('glessrgb image _ _')
160
161 # Decoder tests are now performing gamma correct decodes. This means
162 # that, when viewing the results, we need to perform a gamma correct
163 # encode to PNG. Therefore, we run the image tests in srgb mode instead
164 # of 8888.
165 blacklist('8888 image _ _')
166
167 # Not any point to running these.
168 blacklist('gbr-8888 image _ _')
169 blacklist('gbr-8888 colorImage _ _')
170
171 if 'Valgrind' in bot:
172 # These take 18+ hours to run.
173 blacklist('pdf gm _ fontmgr_iter')
174 blacklist('pdf _ _ PANO_20121023_214540.jpg')
175 blacklist('pdf skp _ worldjournal')
176 blacklist('pdf skp _ desk_baidu.skp')
177 blacklist('pdf skp _ desk_wikipedia.skp')
178 blacklist('_ svg _ _')
179
180 if 'iOS' in bot:
181 blacklist(gl_prefix + ' skp _ _')
182
183 if 'Mac' in bot or 'iOS' in bot:
184 # CG fails on questionable bmps
185 blacklist('_ image gen_platf rgba32abf.bmp')
186 blacklist('_ image gen_platf rgb24prof.bmp')
187 blacklist('_ image gen_platf rgb24lprof.bmp')
188 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
189 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
190 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
191 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
192
193 # CG has unpredictable behavior on this questionable gif
194 # It's probably using uninitialized memory
195 blacklist('_ image gen_platf frame_larger_than_image.gif')
196
197 # CG has unpredictable behavior on incomplete pngs
198 # skbug.com/5774
199 blacklist('_ image gen_platf inc0.png')
200 blacklist('_ image gen_platf inc1.png')
201 blacklist('_ image gen_platf inc2.png')
202 blacklist('_ image gen_platf inc3.png')
203 blacklist('_ image gen_platf inc4.png')
204 blacklist('_ image gen_platf inc5.png')
205 blacklist('_ image gen_platf inc6.png')
206 blacklist('_ image gen_platf inc7.png')
207 blacklist('_ image gen_platf inc8.png')
208 blacklist('_ image gen_platf inc9.png')
209 blacklist('_ image gen_platf inc10.png')
210 blacklist('_ image gen_platf inc11.png')
211 blacklist('_ image gen_platf inc12.png')
212 blacklist('_ image gen_platf inc13.png')
213 blacklist('_ image gen_platf inc14.png')
214
215 # WIC fails on questionable bmps and arithmetic jpegs
216 if 'Win' in bot:
217 blacklist('_ image gen_platf rle8-height-negative.bmp')
218 blacklist('_ image gen_platf rle4-height-negative.bmp')
219 blacklist('_ image gen_platf pal8os2v2.bmp')
220 blacklist('_ image gen_platf pal8os2v2-16.bmp')
221 blacklist('_ image gen_platf rgba32abf.bmp')
222 blacklist('_ image gen_platf rgb24prof.bmp')
223 blacklist('_ image gen_platf rgb24lprof.bmp')
224 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
225 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
226 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
227 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
228 blacklist('_ image gen_platf testimgari.jpg')
229 if 'x86_64' in bot and 'CPU' in bot:
230 # This GM triggers a SkSmallAllocator assert.
231 blacklist('_ gm _ composeshader_bitmap')
232
233 if 'Android' in bot or 'iOS' in bot:
234 # This test crashes the N9 (perhaps because of large malloc/frees). It also
235 # is fairly slow and not platform-specific. So we just disable it on all of
236 # Android and iOS. skia:5438
237 blacklist('_ test _ GrShape')
238
239 if 'Win8' in bot:
240 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
241 # 'Unexpected error' from DirectWrite"
242 blacklist('_ gm _ fontscalerdistortable')
243 # skia:5636
244 blacklist('_ svg _ Nebraska-StateSeal.svg')
245
246 # skia:4095
247 bad_serialize_gms = ['bleed_image',
248 'c_gms',
249 'colortype',
250 'colortype_xfermodes',
251 'drawfilter',
252 'fontmgr_bounds_0.75_0',
253 'fontmgr_bounds_1_-0.25',
254 'fontmgr_bounds',
255 'fontmgr_match',
256 'fontmgr_iter',
257 'imagemasksubset']
258
259 # skia:5589
260 bad_serialize_gms.extend(['bitmapfilters',
261 'bitmapshaders',
262 'bleed',
263 'bleed_alpha_bmp',
264 'bleed_alpha_bmp_shader',
265 'convex_poly_clip',
266 'extractalpha',
267 'filterbitmap_checkerboard_32_32_g8',
268 'filterbitmap_image_mandrill_64',
269 'shadows',
270 'simpleaaclip_aaclip'])
271 # skia:5595
272 bad_serialize_gms.extend(['composeshader_bitmap',
273 'scaled_tilemodes_npot',
274 'scaled_tilemodes'])
275
276 # skia:5778
277 bad_serialize_gms.append('typefacerendering_pfaMac')
278 # skia:5942
279 bad_serialize_gms.append('parsedpaths')
280
281 # these use a custom image generator which doesn't serialize
282 bad_serialize_gms.append('ImageGeneratorExternal_rect')
283 bad_serialize_gms.append('ImageGeneratorExternal_shader')
284
285 # skia:6189
286 bad_serialize_gms.append('shadow_utils')
287
288 for test in bad_serialize_gms:
289 blacklist(['serialize-8888', 'gm', '_', test])
290
291 if 'Mac' not in bot:
292 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
293 blacklist(['serialize-8888', 'gm', '_', test])
294 # It looks like we skip these only for out-of-memory concerns.
295 if 'Win' in bot or 'Android' in bot:
296 for test in ['verylargebitmap', 'verylarge_picture_image']:
297 blacklist(['serialize-8888', 'gm', '_', test])
298
299 # skia:4769
300 for test in ['drawfilter']:
301 blacklist([ 'sp-8888', 'gm', '_', test])
302 blacklist([ 'pic-8888', 'gm', '_', test])
303 blacklist(['2ndpic-8888', 'gm', '_', test])
304 blacklist([ 'lite-8888', 'gm', '_', test])
305 # skia:4703
306 for test in ['image-cacherator-from-picture',
307 'image-cacherator-from-raster',
308 'image-cacherator-from-ctable']:
309 blacklist([ 'sp-8888', 'gm', '_', test])
310 blacklist([ 'pic-8888', 'gm', '_', test])
311 blacklist([ '2ndpic-8888', 'gm', '_', test])
312 blacklist(['serialize-8888', 'gm', '_', test])
313
314 # GM that requires raster-backed canvas
315 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
316 blacklist([ 'sp-8888', 'gm', '_', test])
317 blacklist([ 'pic-8888', 'gm', '_', test])
318 blacklist([ 'lite-8888', 'gm', '_', test])
319 blacklist([ '2ndpic-8888', 'gm', '_', test])
320 blacklist(['serialize-8888', 'gm', '_', test])
321
322 # GM that not support tiles_rt
323 for test in ['complexclip4_bw', 'complexclip4_aa']:
324 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
325
326 # Extensions for RAW images
327 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
328 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
329
330 # skbug.com/4888
331 # Blacklist RAW images (and a few large PNGs) on GPU bots
332 # until we can resolve failures.
333 # Also blacklisted on 32-bit Win2k8 for F16 OOM errors.
334 if 'GPU' in bot or ('Win2k8' in bot and 'x86-' in bot):
335 blacklist('_ image _ interlaced1.png')
336 blacklist('_ image _ interlaced2.png')
337 blacklist('_ image _ interlaced3.png')
338 for raw_ext in r:
339 blacklist('_ image _ .%s' % raw_ext)
340
341 # Large image that overwhelms older Mac bots
342 if 'MacMini4.1-GPU' in bot:
343 blacklist('_ image _ abnormal.wbmp')
344 blacklist([gl_prefix + 'msaa' + sample_count, 'gm', '_', 'blurcircles'])
345
346 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
347 # skia:6331
348 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
349 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
350
351 if 'Nexus5' in bot:
352 # skia:5876
353 blacklist(['_', 'gm', '_', 'encode-platform'])
354
355 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
356 blacklist(['_', 'gm', '_', 'bigblurs'])
357 blacklist(['_', 'gm', '_', 'bleed'])
358 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
359 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
360 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
361 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
362 blacklist(['_', 'gm', '_', 'bleed_image'])
363 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
364 blacklist(['_', 'gm', '_', 'filterfastbounds'])
365 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
366 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
367 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
368 blacklist(['_', 'gm', '_', 'imageresizetiled'])
369 blacklist(['_', 'gm', '_', 'matrixconvolution'])
370 blacklist(['_', 'gm', '_', 'strokedlines'])
371 if sample_count is not '':
372 gl_msaa_config = gl_prefix + 'msaa' + sample_count
373 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
374 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
375
376 match = []
377 if 'Valgrind' in bot: # skia:3021
378 match.append('~Threaded')
379
380 if 'AndroidOne' in bot: # skia:4711
381 match.append('~WritePixels')
382
383 if 'NexusPlayer' in bot:
384 match.append('~ResourceCache')
385
386 if 'Nexus10' in bot:
387 match.append('~CopySurface') # skia:5509
388 match.append('~SRGBReadWritePixels') # skia:6097
389
390 if 'GalaxyJ5' in bot:
391 match.append('~SRGBReadWritePixels') # skia:6097
392
393 if 'GalaxyS6' in bot:
394 match.append('~SpecialImage') # skia:6338
395
396 if 'GalaxyS7_G930A' in bot:
397 match.append('~WritePixels') # skia:6427
398
399 if 'ANGLE' in bot and 'Debug' in bot:
400 match.append('~GLPrograms') # skia:4717
401
402 if 'MSAN' in bot:
403 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
404
405 if 'TSAN' in bot:
406 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
407 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
408 '~RGB565TextureTest'])
409
410 if 'Vulkan' in bot and 'Adreno' in bot:
411 # skia:5777
412 match.extend(['~XfermodeImageFilterCroppedInput',
413 '~GrTextureStripAtlasFlush',
414 '~CopySurface'])
415
416 if 'Vulkan' in bot and 'NexusPlayer' in bot:
417 match.extend(['~hardstop_gradient', # skia:6037
418 '~gradients_dup_color_stops', # skia:6037
419 '~gradients_no_texture$', # skia:6132
420 '~tilemodes', # skia:6132
421 '~shadertext$', # skia:6132
422 '~bitmapfilters', # skia:6132
423 '~GrContextFactory_abandon']) #skia:6209
424
425 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Ubuntu' in bot:
426 match.extend(['~VkHeapTests']) # skia:6245
427
428 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
429 # skia:6398
430 blacklist(['vk', 'gm', '_', 'aarectmodes'])
431 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
432 blacklist(['vk', 'gm', '_', 'arithmode'])
433 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
434 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
435 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
436 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
437 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
438 blacklist(['vk', 'gm', '_', 'fontcache'])
439 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
440 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
441 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
442 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
443 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
444 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
445 blacklist(['vk', 'gm', '_', 'gammatextWin'])
446 blacklist(['vk', 'gm', '_', 'gradtext'])
447 blacklist(['vk', 'gm', '_', 'hairmodes'])
448 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
449 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
450 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
451 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
452 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
453 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
454 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
455 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
456 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
457 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
458 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
459 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
460 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
461 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
462 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
463 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
464 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
465 blacklist(['vk', 'gm', '_', 'srcmode'])
466 blacklist(['vk', 'gm', '_', 'surfaceprops'])
467 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
468 blacklist(['vk', 'gm', '_', 'textbloblooper'])
469 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
470 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
471 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
472 blacklist(['vk', 'gm', '_', 'textfilter_color'])
473 blacklist(['vk', 'gm', '_', 'textfilter_image'])
474 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
475 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
476 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
477 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
478 match.append('~ApplyGamma')
479 match.append('~ComposedImageFilterBounds_Gpu')
480 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
481 match.append('~ImageFilterZeroBlurSigma_Gpu')
482 match.append('~ImageNewShader_GPU')
483 match.append('~NewTextureFromPixmap')
484 match.append('~ReadPixels_Gpu')
485 match.append('~ReadPixels_Texture')
486 match.append('~ReadWriteAlpha')
487 match.append('~SRGBReadWritePixels')
488 match.append('~SpecialImage_DeferredGpu')
489 match.append('~SpecialImage_Gpu')
490 match.append('~WritePixels_Gpu')
491 match.append('~XfermodeImageFilterCroppedInput_Gpu')
492
493 if 'IntelIris540' in bot and 'ANGLE' in bot:
494 match.append('~IntTexture') # skia:6086
495 blacklist(['_', 'gm', '_', 'discard']) # skia:6141
496 # skia:6103
497 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
498 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
499 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
500 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
501 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
502 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
503
504 if 'IntelBayTrail' in bot and 'Ubuntu' in bot:
505 match.append('~ImageStorageLoad') # skia:6358
506
507 if blacklisted:
508 args.append('--blacklist')
509 args.extend(blacklisted)
510
511 if match:
512 args.append('--match')
513 args.extend(match)
514
515 # These bots run out of memory running RAW codec tests. Do not run them in
516 # parallel
517 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
518 or 'Win8-MSVC-ShuttleB' in bot):
519 args.append('--noRAW_threading')
520
521 return args
522
523
524def key_params(api):
525 """Build a unique key from the builder name (as a list).
526
527 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
528 """
529 # Don't bother to include role, which is always Test.
530 # TryBots are uploaded elsewhere so they can use the same key.
531 blacklist = ['role', 'is_trybot']
532
533 flat = []
534 for k in sorted(api.vars.builder_cfg.keys()):
535 if k not in blacklist:
536 flat.append(k)
537 flat.append(api.vars.builder_cfg[k])
538 return flat
539
540
541def test_steps(api):
542 """Run the DM test."""
543 use_hash_file = False
544 if api.vars.upload_dm_results:
545 # This must run before we write anything into
546 # api.flavor.device_dirs.dm_dir or we may end up deleting our
547 # output on machines where they're the same.
548 api.flavor.create_clean_host_dir(api.vars.dm_dir)
549 host_dm_dir = str(api.vars.dm_dir)
550 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
551 if host_dm_dir != device_dm_dir:
552 api.flavor.create_clean_device_dir(device_dm_dir)
553
554 # Obtain the list of already-generated hashes.
555 hash_filename = 'uninteresting_hashes.txt'
556
557 # Ensure that the tmp_dir exists.
558 api.run.run_once(api.file.makedirs,
559 'tmp_dir',
560 api.vars.tmp_dir,
561 infra_step=True)
562
563 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
564 hashes_file = api.flavor.device_path_join(
565 api.flavor.device_dirs.tmp_dir, hash_filename)
566 api.run(
567 api.python.inline,
568 'get uninteresting hashes',
569 program="""
570 import contextlib
571 import math
572 import socket
573 import sys
574 import time
575 import urllib2
576
577 HASHES_URL = 'https://gold.skia.org/_/hashes'
578 RETRIES = 5
579 TIMEOUT = 60
580 WAIT_BASE = 15
581
582 socket.setdefaulttimeout(TIMEOUT)
583 for retry in range(RETRIES):
584 try:
585 with contextlib.closing(
586 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
587 hashes = w.read()
588 with open(sys.argv[1], 'w') as f:
589 f.write(hashes)
590 break
591 except Exception as e:
592 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
593 print e
594 if retry == RETRIES:
595 raise
596 waittime = WAIT_BASE * math.pow(2, retry)
597 print 'Retry in %d seconds.' % waittime
598 time.sleep(waittime)
599 """,
600 args=[host_hashes_file],
601 abort_on_failure=False,
602 fail_build_on_failure=False,
603 infra_step=True)
604
605 if api.path.exists(host_hashes_file):
606 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
607 use_hash_file = True
608
609 # Run DM.
610 properties = [
611 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400612 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400613 ]
614 if api.vars.is_trybot:
615 properties.extend([
616 'issue', api.vars.issue,
617 'patchset', api.vars.patchset,
618 'patch_storage', api.vars.patch_storage,
619 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400620 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
621 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400622
623 args = [
624 'dm',
625 '--undefok', # This helps branches that may not know new flags.
626 '--resourcePath', api.flavor.device_dirs.resource_dir,
627 '--skps', api.flavor.device_dirs.skp_dir,
628 '--images', api.flavor.device_path_join(
629 api.flavor.device_dirs.images_dir, 'dm'),
630 '--colorImages', api.flavor.device_path_join(
631 api.flavor.device_dirs.images_dir, 'colorspace'),
632 '--nameByHash',
633 '--properties'
634 ] + properties
635
636 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
637
638 args.append('--key')
639 args.extend(key_params(api))
640 if use_hash_file:
641 args.extend(['--uninterestingHashesFile', hashes_file])
642 if api.vars.upload_dm_results:
643 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
644
645 skip_flag = None
646 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
647 skip_flag = '--nogpu'
648 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
649 skip_flag = '--nocpu'
650 if skip_flag:
651 args.append(skip_flag)
652 args.extend(dm_flags(api.vars.builder_name))
653
654 env = api.step.get_from_context('env', {})
655 if 'Ubuntu16' in api.vars.builder_name:
656 # The vulkan in this asset name simply means that the graphics driver
657 # supports Vulkan. It is also the driver used for GL code.
658 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
659 if 'Debug' in api.vars.builder_name:
660 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
661
662 if 'Vulkan' in api.vars.builder_name:
663 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
664 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
665 env.update({
666 'PATH':'%%(PATH)s:%s' % sdk_path,
667 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
668 'LIBGL_DRIVERS_PATH': dri_path,
669 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
670 })
671 else:
672 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
673 env.update({
674 'LD_LIBRARY_PATH': dri_path,
675 'LIBGL_DRIVERS_PATH': dri_path,
676 })
677
678 # See skia:2789.
679 if '_AbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
680 args.append('--abandonGpuContext')
681 if '_PreAbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
682 args.append('--preAbandonGpuContext')
683
684 with api.step.context({'env': env}):
685 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
686
687 if api.vars.upload_dm_results:
688 # Copy images and JSON to host machine if needed.
689 api.flavor.copy_directory_contents_to_host(
690 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
691
692
borenet1ed2ae42016-07-26 11:52:17 -0700693def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400694 api.core.setup()
695 env = api.step.get_from_context('env', {})
696 if 'iOS' in api.vars.builder_name:
697 env['IOS_BUNDLE_ID'] = 'com.google.dm'
698 with api.step.context({'env': env}):
699 try:
700 api.flavor.install_everything()
701 test_steps(api)
702 finally:
703 api.flavor.cleanup_steps()
704 api.run.check_failure()
705
706
Eric Borenf9aa9e52017-04-10 09:56:10 -0400707TEST_BUILDERS = [
708 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
709 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
710 'Test-Android-Clang-GalaxyJ5-GPU-Adreno306-arm-Release-Android',
711 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
712 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
713 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
714 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
715 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
716 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
717 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
718 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
719 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
720 ('Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-'
721 'GN_Android_Vulkan'),
722 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
723 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
724 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
725 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
726 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
727 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
728 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
729 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
730 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
731 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
732 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
733 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
734 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
735 '_AbandonGpuContext'),
736 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
737 '_PreAbandonGpuContext'),
738 'Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan',
739 'Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release',
740 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
741 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
742 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
743 'Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE',
744 'Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan',
745 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
746 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
747 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
748 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
749 'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release',
750 ('Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_' +
751 'SCALEDIMAGECACHE'),
752]
borenet1ed2ae42016-07-26 11:52:17 -0700753
754
755def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400756 for builder in TEST_BUILDERS:
757 test = (
758 api.test(builder) +
759 api.properties(buildername=builder,
760 revision='abc123',
761 path_config='kitchen',
762 swarm_out_dir='[SWARM_OUT_DIR]') +
763 api.path.exists(
764 api.path['start_dir'].join('skia'),
765 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
766 'skimage', 'VERSION'),
767 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
768 'skp', 'VERSION'),
769 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
770 'svg', 'VERSION'),
771 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
772 )
773 )
774 if 'Trybot' in builder:
775 test += api.properties(patch_storage='gerrit')
776 test += api.properties.tryserver(
777 buildername=builder,
778 gerrit_project='skia',
779 gerrit_url='https://skia-review.googlesource.com/',
780 )
781 if 'Win' in builder:
782 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400783
Eric Borenf9aa9e52017-04-10 09:56:10 -0400784 if 'ChromeOS' in builder:
785 test += api.step_data(
786 'read chromeos ip',
787 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400788
789
Eric Borenf9aa9e52017-04-10 09:56:10 -0400790 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400791
792 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700793 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400794 api.test('failed_dm') +
795 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700796 revision='abc123',
797 path_config='kitchen',
798 swarm_out_dir='[SWARM_OUT_DIR]') +
799 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500800 api.path['start_dir'].join('skia'),
801 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400802 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500803 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400804 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500805 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400806 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500807 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400808 ) +
809 api.step_data('symbolized dm', retcode=1)
810 )
811
812 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
813 yield (
814 api.test('failed_get_hashes') +
815 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400816 revision='abc123',
817 path_config='kitchen',
818 swarm_out_dir='[SWARM_OUT_DIR]') +
819 api.path.exists(
820 api.path['start_dir'].join('skia'),
821 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
822 'skimage', 'VERSION'),
823 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
824 'skp', 'VERSION'),
825 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
826 'svg', 'VERSION'),
827 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
828 ) +
829 api.step_data('get uninteresting hashes', retcode=1)
830 )
831
Eric Boren4c7754c2017-04-10 08:19:10 -0400832 builder = 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-GN_Android'
833 yield (
834 api.test('failed_push') +
835 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400836 revision='abc123',
837 path_config='kitchen',
838 swarm_out_dir='[SWARM_OUT_DIR]') +
839 api.path.exists(
840 api.path['start_dir'].join('skia'),
841 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
842 'skimage', 'VERSION'),
843 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
844 'skp', 'VERSION'),
845 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
846 'svg', 'VERSION'),
847 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
848 ) +
849 api.step_data('push [START_DIR]/skia/resources/* '+
850 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
851 )
852
853 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
854 yield (
855 api.test('failed_pull') +
856 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400857 revision='abc123',
858 path_config='kitchen',
859 swarm_out_dir='[SWARM_OUT_DIR]') +
860 api.path.exists(
861 api.path['start_dir'].join('skia'),
862 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
863 'skimage', 'VERSION'),
864 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
865 'skp', 'VERSION'),
866 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
867 'svg', 'VERSION'),
868 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
869 ) +
870 api.step_data('dm', retcode=1) +
871 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
872 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -0700873 )