blob: fb893781b1a4894812b92d6579b3713b24065df3 [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
Kevin Lubickae95db42017-04-10 13:05:49 -0400141 if 'Ci20' in bot:
142 # This bot is really slow, cut it down to just 8888.
143 configs = ['8888']
144
Eric Boren4c7754c2017-04-10 08:19:10 -0400145 args.append('--config')
146 args.extend(configs)
147
148 # Run tests, gms, and image decoding tests everywhere.
149 args.extend('--src tests gm image colorImage svg'.split(' '))
150 if 'Vulkan' in bot and 'NexusPlayer' in bot:
151 args.remove('svg')
152 args.remove('image')
153
154 blacklisted = []
155 def blacklist(quad):
156 config, src, options, name = quad.split(' ') if type(quad) is str else quad
157 if config == '_' or config in configs:
158 blacklisted.extend([config, src, options, name])
159
160 # TODO: ???
161 blacklist('f16 _ _ dstreadshuffle')
162 blacklist('glsrgb image _ _')
163 blacklist('glessrgb image _ _')
164
165 # Decoder tests are now performing gamma correct decodes. This means
166 # that, when viewing the results, we need to perform a gamma correct
167 # encode to PNG. Therefore, we run the image tests in srgb mode instead
168 # of 8888.
169 blacklist('8888 image _ _')
170
171 # Not any point to running these.
172 blacklist('gbr-8888 image _ _')
173 blacklist('gbr-8888 colorImage _ _')
174
175 if 'Valgrind' in bot:
176 # These take 18+ hours to run.
177 blacklist('pdf gm _ fontmgr_iter')
178 blacklist('pdf _ _ PANO_20121023_214540.jpg')
179 blacklist('pdf skp _ worldjournal')
180 blacklist('pdf skp _ desk_baidu.skp')
181 blacklist('pdf skp _ desk_wikipedia.skp')
182 blacklist('_ svg _ _')
183
184 if 'iOS' in bot:
185 blacklist(gl_prefix + ' skp _ _')
186
187 if 'Mac' in bot or 'iOS' in bot:
188 # CG fails on questionable bmps
189 blacklist('_ image gen_platf rgba32abf.bmp')
190 blacklist('_ image gen_platf rgb24prof.bmp')
191 blacklist('_ image gen_platf rgb24lprof.bmp')
192 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
193 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
194 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
195 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
196
197 # CG has unpredictable behavior on this questionable gif
198 # It's probably using uninitialized memory
199 blacklist('_ image gen_platf frame_larger_than_image.gif')
200
201 # CG has unpredictable behavior on incomplete pngs
202 # skbug.com/5774
203 blacklist('_ image gen_platf inc0.png')
204 blacklist('_ image gen_platf inc1.png')
205 blacklist('_ image gen_platf inc2.png')
206 blacklist('_ image gen_platf inc3.png')
207 blacklist('_ image gen_platf inc4.png')
208 blacklist('_ image gen_platf inc5.png')
209 blacklist('_ image gen_platf inc6.png')
210 blacklist('_ image gen_platf inc7.png')
211 blacklist('_ image gen_platf inc8.png')
212 blacklist('_ image gen_platf inc9.png')
213 blacklist('_ image gen_platf inc10.png')
214 blacklist('_ image gen_platf inc11.png')
215 blacklist('_ image gen_platf inc12.png')
216 blacklist('_ image gen_platf inc13.png')
217 blacklist('_ image gen_platf inc14.png')
218
219 # WIC fails on questionable bmps and arithmetic jpegs
220 if 'Win' in bot:
221 blacklist('_ image gen_platf rle8-height-negative.bmp')
222 blacklist('_ image gen_platf rle4-height-negative.bmp')
223 blacklist('_ image gen_platf pal8os2v2.bmp')
224 blacklist('_ image gen_platf pal8os2v2-16.bmp')
225 blacklist('_ image gen_platf rgba32abf.bmp')
226 blacklist('_ image gen_platf rgb24prof.bmp')
227 blacklist('_ image gen_platf rgb24lprof.bmp')
228 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
229 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
230 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
231 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
232 blacklist('_ image gen_platf testimgari.jpg')
233 if 'x86_64' in bot and 'CPU' in bot:
234 # This GM triggers a SkSmallAllocator assert.
235 blacklist('_ gm _ composeshader_bitmap')
236
237 if 'Android' in bot or 'iOS' in bot:
238 # This test crashes the N9 (perhaps because of large malloc/frees). It also
239 # is fairly slow and not platform-specific. So we just disable it on all of
240 # Android and iOS. skia:5438
241 blacklist('_ test _ GrShape')
242
243 if 'Win8' in bot:
244 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
245 # 'Unexpected error' from DirectWrite"
246 blacklist('_ gm _ fontscalerdistortable')
247 # skia:5636
248 blacklist('_ svg _ Nebraska-StateSeal.svg')
249
250 # skia:4095
251 bad_serialize_gms = ['bleed_image',
252 'c_gms',
253 'colortype',
254 'colortype_xfermodes',
255 'drawfilter',
256 'fontmgr_bounds_0.75_0',
257 'fontmgr_bounds_1_-0.25',
258 'fontmgr_bounds',
259 'fontmgr_match',
260 'fontmgr_iter',
261 'imagemasksubset']
262
263 # skia:5589
264 bad_serialize_gms.extend(['bitmapfilters',
265 'bitmapshaders',
266 'bleed',
267 'bleed_alpha_bmp',
268 'bleed_alpha_bmp_shader',
269 'convex_poly_clip',
270 'extractalpha',
271 'filterbitmap_checkerboard_32_32_g8',
272 'filterbitmap_image_mandrill_64',
273 'shadows',
274 'simpleaaclip_aaclip'])
275 # skia:5595
276 bad_serialize_gms.extend(['composeshader_bitmap',
277 'scaled_tilemodes_npot',
278 'scaled_tilemodes'])
279
280 # skia:5778
281 bad_serialize_gms.append('typefacerendering_pfaMac')
282 # skia:5942
283 bad_serialize_gms.append('parsedpaths')
284
285 # these use a custom image generator which doesn't serialize
286 bad_serialize_gms.append('ImageGeneratorExternal_rect')
287 bad_serialize_gms.append('ImageGeneratorExternal_shader')
288
289 # skia:6189
290 bad_serialize_gms.append('shadow_utils')
291
292 for test in bad_serialize_gms:
293 blacklist(['serialize-8888', 'gm', '_', test])
294
295 if 'Mac' not in bot:
296 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
297 blacklist(['serialize-8888', 'gm', '_', test])
298 # It looks like we skip these only for out-of-memory concerns.
299 if 'Win' in bot or 'Android' in bot:
300 for test in ['verylargebitmap', 'verylarge_picture_image']:
301 blacklist(['serialize-8888', 'gm', '_', test])
302
303 # skia:4769
304 for test in ['drawfilter']:
305 blacklist([ 'sp-8888', 'gm', '_', test])
306 blacklist([ 'pic-8888', 'gm', '_', test])
307 blacklist(['2ndpic-8888', 'gm', '_', test])
308 blacklist([ 'lite-8888', 'gm', '_', test])
309 # skia:4703
310 for test in ['image-cacherator-from-picture',
311 'image-cacherator-from-raster',
312 'image-cacherator-from-ctable']:
313 blacklist([ 'sp-8888', 'gm', '_', test])
314 blacklist([ 'pic-8888', 'gm', '_', test])
315 blacklist([ '2ndpic-8888', 'gm', '_', test])
316 blacklist(['serialize-8888', 'gm', '_', test])
317
318 # GM that requires raster-backed canvas
319 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
320 blacklist([ 'sp-8888', 'gm', '_', test])
321 blacklist([ 'pic-8888', 'gm', '_', test])
322 blacklist([ 'lite-8888', 'gm', '_', test])
323 blacklist([ '2ndpic-8888', 'gm', '_', test])
324 blacklist(['serialize-8888', 'gm', '_', test])
325
326 # GM that not support tiles_rt
327 for test in ['complexclip4_bw', 'complexclip4_aa']:
328 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
329
330 # Extensions for RAW images
331 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
332 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
333
334 # skbug.com/4888
335 # Blacklist RAW images (and a few large PNGs) on GPU bots
336 # until we can resolve failures.
337 # Also blacklisted on 32-bit Win2k8 for F16 OOM errors.
338 if 'GPU' in bot or ('Win2k8' in bot and 'x86-' in bot):
339 blacklist('_ image _ interlaced1.png')
340 blacklist('_ image _ interlaced2.png')
341 blacklist('_ image _ interlaced3.png')
342 for raw_ext in r:
343 blacklist('_ image _ .%s' % raw_ext)
344
Eric Boren4c7754c2017-04-10 08:19:10 -0400345 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
346 # skia:6331
347 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
348 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
349
350 if 'Nexus5' in bot:
351 # skia:5876
352 blacklist(['_', 'gm', '_', 'encode-platform'])
353
354 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
355 blacklist(['_', 'gm', '_', 'bigblurs'])
356 blacklist(['_', 'gm', '_', 'bleed'])
357 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
358 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
359 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
360 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
361 blacklist(['_', 'gm', '_', 'bleed_image'])
362 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
363 blacklist(['_', 'gm', '_', 'filterfastbounds'])
364 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
365 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
366 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
367 blacklist(['_', 'gm', '_', 'imageresizetiled'])
368 blacklist(['_', 'gm', '_', 'matrixconvolution'])
369 blacklist(['_', 'gm', '_', 'strokedlines'])
370 if sample_count is not '':
371 gl_msaa_config = gl_prefix + 'msaa' + sample_count
372 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
373 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
374
375 match = []
376 if 'Valgrind' in bot: # skia:3021
377 match.append('~Threaded')
378
379 if 'AndroidOne' in bot: # skia:4711
380 match.append('~WritePixels')
381
382 if 'NexusPlayer' in bot:
383 match.append('~ResourceCache')
384
385 if 'Nexus10' in bot:
386 match.append('~CopySurface') # skia:5509
387 match.append('~SRGBReadWritePixels') # skia:6097
388
389 if 'GalaxyJ5' in bot:
390 match.append('~SRGBReadWritePixels') # skia:6097
391
392 if 'GalaxyS6' in bot:
393 match.append('~SpecialImage') # skia:6338
394
395 if 'GalaxyS7_G930A' in bot:
396 match.append('~WritePixels') # skia:6427
397
398 if 'ANGLE' in bot and 'Debug' in bot:
399 match.append('~GLPrograms') # skia:4717
400
401 if 'MSAN' in bot:
402 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
403
404 if 'TSAN' in bot:
405 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
406 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
407 '~RGB565TextureTest'])
408
409 if 'Vulkan' in bot and 'Adreno' in bot:
410 # skia:5777
411 match.extend(['~XfermodeImageFilterCroppedInput',
412 '~GrTextureStripAtlasFlush',
413 '~CopySurface'])
414
415 if 'Vulkan' in bot and 'NexusPlayer' in bot:
416 match.extend(['~hardstop_gradient', # skia:6037
417 '~gradients_dup_color_stops', # skia:6037
418 '~gradients_no_texture$', # skia:6132
419 '~tilemodes', # skia:6132
420 '~shadertext$', # skia:6132
421 '~bitmapfilters', # skia:6132
422 '~GrContextFactory_abandon']) #skia:6209
423
424 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Ubuntu' in bot:
425 match.extend(['~VkHeapTests']) # skia:6245
426
427 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
428 # skia:6398
429 blacklist(['vk', 'gm', '_', 'aarectmodes'])
430 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
431 blacklist(['vk', 'gm', '_', 'arithmode'])
432 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
433 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
434 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
435 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
436 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
437 blacklist(['vk', 'gm', '_', 'fontcache'])
438 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
439 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
440 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
441 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
442 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
443 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
444 blacklist(['vk', 'gm', '_', 'gammatextWin'])
445 blacklist(['vk', 'gm', '_', 'gradtext'])
446 blacklist(['vk', 'gm', '_', 'hairmodes'])
447 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
448 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
449 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
450 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
451 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
452 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
453 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
454 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
455 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
456 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
457 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
458 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
459 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
460 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
461 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
462 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
463 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
464 blacklist(['vk', 'gm', '_', 'srcmode'])
465 blacklist(['vk', 'gm', '_', 'surfaceprops'])
466 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
467 blacklist(['vk', 'gm', '_', 'textbloblooper'])
468 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
469 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
470 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
471 blacklist(['vk', 'gm', '_', 'textfilter_color'])
472 blacklist(['vk', 'gm', '_', 'textfilter_image'])
473 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
474 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
475 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
476 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
477 match.append('~ApplyGamma')
478 match.append('~ComposedImageFilterBounds_Gpu')
479 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
480 match.append('~ImageFilterZeroBlurSigma_Gpu')
481 match.append('~ImageNewShader_GPU')
482 match.append('~NewTextureFromPixmap')
483 match.append('~ReadPixels_Gpu')
484 match.append('~ReadPixels_Texture')
485 match.append('~ReadWriteAlpha')
486 match.append('~SRGBReadWritePixels')
487 match.append('~SpecialImage_DeferredGpu')
488 match.append('~SpecialImage_Gpu')
489 match.append('~WritePixels_Gpu')
490 match.append('~XfermodeImageFilterCroppedInput_Gpu')
491
492 if 'IntelIris540' in bot and 'ANGLE' in bot:
493 match.append('~IntTexture') # skia:6086
494 blacklist(['_', 'gm', '_', 'discard']) # skia:6141
495 # skia:6103
496 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
497 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
498 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
499 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
500 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
501 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
502
503 if 'IntelBayTrail' in bot and 'Ubuntu' in bot:
504 match.append('~ImageStorageLoad') # skia:6358
505
Kevin Lubickae95db42017-04-10 13:05:49 -0400506 if 'Ci20' in bot:
507 match.append('~Codec_Dimensions') # skia:6477
508 match.append('~FontMgrAndroidParser') # skia:6478
509 match.append('~PathOpsSimplify') # skia:6479
510 blacklist(['_', 'gm', '_', 'fast_slow_blurimagefilter']) # skia:6480
511
512
Eric Boren4c7754c2017-04-10 08:19:10 -0400513 if blacklisted:
514 args.append('--blacklist')
515 args.extend(blacklisted)
516
517 if match:
518 args.append('--match')
519 args.extend(match)
520
521 # These bots run out of memory running RAW codec tests. Do not run them in
522 # parallel
523 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
524 or 'Win8-MSVC-ShuttleB' in bot):
525 args.append('--noRAW_threading')
526
527 return args
528
529
530def key_params(api):
531 """Build a unique key from the builder name (as a list).
532
533 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
534 """
535 # Don't bother to include role, which is always Test.
536 # TryBots are uploaded elsewhere so they can use the same key.
537 blacklist = ['role', 'is_trybot']
538
539 flat = []
540 for k in sorted(api.vars.builder_cfg.keys()):
541 if k not in blacklist:
542 flat.append(k)
543 flat.append(api.vars.builder_cfg[k])
544 return flat
545
546
547def test_steps(api):
548 """Run the DM test."""
549 use_hash_file = False
550 if api.vars.upload_dm_results:
551 # This must run before we write anything into
552 # api.flavor.device_dirs.dm_dir or we may end up deleting our
553 # output on machines where they're the same.
554 api.flavor.create_clean_host_dir(api.vars.dm_dir)
555 host_dm_dir = str(api.vars.dm_dir)
556 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
557 if host_dm_dir != device_dm_dir:
558 api.flavor.create_clean_device_dir(device_dm_dir)
559
560 # Obtain the list of already-generated hashes.
561 hash_filename = 'uninteresting_hashes.txt'
562
563 # Ensure that the tmp_dir exists.
564 api.run.run_once(api.file.makedirs,
565 'tmp_dir',
566 api.vars.tmp_dir,
567 infra_step=True)
568
569 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
570 hashes_file = api.flavor.device_path_join(
571 api.flavor.device_dirs.tmp_dir, hash_filename)
572 api.run(
573 api.python.inline,
574 'get uninteresting hashes',
575 program="""
576 import contextlib
577 import math
578 import socket
579 import sys
580 import time
581 import urllib2
582
583 HASHES_URL = 'https://gold.skia.org/_/hashes'
584 RETRIES = 5
585 TIMEOUT = 60
586 WAIT_BASE = 15
587
588 socket.setdefaulttimeout(TIMEOUT)
589 for retry in range(RETRIES):
590 try:
591 with contextlib.closing(
592 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
593 hashes = w.read()
594 with open(sys.argv[1], 'w') as f:
595 f.write(hashes)
596 break
597 except Exception as e:
598 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
599 print e
600 if retry == RETRIES:
601 raise
602 waittime = WAIT_BASE * math.pow(2, retry)
603 print 'Retry in %d seconds.' % waittime
604 time.sleep(waittime)
605 """,
606 args=[host_hashes_file],
607 abort_on_failure=False,
608 fail_build_on_failure=False,
609 infra_step=True)
610
611 if api.path.exists(host_hashes_file):
612 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
613 use_hash_file = True
614
615 # Run DM.
616 properties = [
617 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400618 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400619 ]
620 if api.vars.is_trybot:
621 properties.extend([
622 'issue', api.vars.issue,
623 'patchset', api.vars.patchset,
624 'patch_storage', api.vars.patch_storage,
625 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400626 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
627 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400628
629 args = [
630 'dm',
631 '--undefok', # This helps branches that may not know new flags.
632 '--resourcePath', api.flavor.device_dirs.resource_dir,
633 '--skps', api.flavor.device_dirs.skp_dir,
634 '--images', api.flavor.device_path_join(
635 api.flavor.device_dirs.images_dir, 'dm'),
636 '--colorImages', api.flavor.device_path_join(
637 api.flavor.device_dirs.images_dir, 'colorspace'),
638 '--nameByHash',
639 '--properties'
640 ] + properties
641
642 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
643
644 args.append('--key')
645 args.extend(key_params(api))
646 if use_hash_file:
647 args.extend(['--uninterestingHashesFile', hashes_file])
648 if api.vars.upload_dm_results:
649 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
650
651 skip_flag = None
652 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
653 skip_flag = '--nogpu'
654 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
655 skip_flag = '--nocpu'
656 if skip_flag:
657 args.append(skip_flag)
658 args.extend(dm_flags(api.vars.builder_name))
659
660 env = api.step.get_from_context('env', {})
661 if 'Ubuntu16' in api.vars.builder_name:
662 # The vulkan in this asset name simply means that the graphics driver
663 # supports Vulkan. It is also the driver used for GL code.
664 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
665 if 'Debug' in api.vars.builder_name:
666 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
667
668 if 'Vulkan' in api.vars.builder_name:
669 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
670 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
671 env.update({
672 'PATH':'%%(PATH)s:%s' % sdk_path,
673 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
674 'LIBGL_DRIVERS_PATH': dri_path,
675 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
676 })
677 else:
678 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
679 env.update({
680 'LD_LIBRARY_PATH': dri_path,
681 'LIBGL_DRIVERS_PATH': dri_path,
682 })
683
684 # See skia:2789.
685 if '_AbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
686 args.append('--abandonGpuContext')
687 if '_PreAbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
688 args.append('--preAbandonGpuContext')
689
690 with api.step.context({'env': env}):
691 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
692
693 if api.vars.upload_dm_results:
694 # Copy images and JSON to host machine if needed.
695 api.flavor.copy_directory_contents_to_host(
696 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
697
698
borenet1ed2ae42016-07-26 11:52:17 -0700699def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400700 api.core.setup()
701 env = api.step.get_from_context('env', {})
702 if 'iOS' in api.vars.builder_name:
703 env['IOS_BUNDLE_ID'] = 'com.google.dm'
704 with api.step.context({'env': env}):
705 try:
706 api.flavor.install_everything()
707 test_steps(api)
708 finally:
709 api.flavor.cleanup_steps()
710 api.run.check_failure()
711
712
Eric Borenf9aa9e52017-04-10 09:56:10 -0400713TEST_BUILDERS = [
714 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
715 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
Kevin Lubickae95db42017-04-10 13:05:49 -0400716 'Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400717 'Test-Android-Clang-GalaxyJ5-GPU-Adreno306-arm-Release-Android',
718 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
719 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
720 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
721 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
722 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
723 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
724 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
725 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
726 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
727 ('Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-'
728 'GN_Android_Vulkan'),
729 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
730 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400731 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
732 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
733 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
734 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
735 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
736 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
737 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
738 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
739 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
740 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
741 '_AbandonGpuContext'),
742 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
743 '_PreAbandonGpuContext'),
744 'Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan',
745 'Test-Ubuntu16-Clang-NUC-GPU-IntelIris540-x86_64-Release',
746 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
747 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
748 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
749 'Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-ANGLE',
750 'Test-Win10-MSVC-NUC-GPU-IntelIris540-x86_64-Debug-Vulkan',
751 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
752 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
753 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
754 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
755 'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release',
756 ('Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_' +
757 'SCALEDIMAGECACHE'),
758]
borenet1ed2ae42016-07-26 11:52:17 -0700759
760
761def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400762 for builder in TEST_BUILDERS:
763 test = (
764 api.test(builder) +
765 api.properties(buildername=builder,
766 revision='abc123',
767 path_config='kitchen',
768 swarm_out_dir='[SWARM_OUT_DIR]') +
769 api.path.exists(
770 api.path['start_dir'].join('skia'),
771 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
772 'skimage', 'VERSION'),
773 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
774 'skp', 'VERSION'),
775 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
776 'svg', 'VERSION'),
777 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
778 )
779 )
780 if 'Trybot' in builder:
Kevin Lubickae95db42017-04-10 13:05:49 -0400781 test += api.properties(patch_storage='gerrit')
Eric Borenf9aa9e52017-04-10 09:56:10 -0400782 test += api.properties.tryserver(
783 buildername=builder,
784 gerrit_project='skia',
785 gerrit_url='https://skia-review.googlesource.com/',
786 )
787 if 'Win' in builder:
788 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400789
Eric Borenf9aa9e52017-04-10 09:56:10 -0400790 if 'ChromeOS' in builder:
791 test += api.step_data(
792 'read chromeos ip',
793 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400794
795
Eric Borenf9aa9e52017-04-10 09:56:10 -0400796 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400797
798 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700799 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400800 api.test('failed_dm') +
801 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700802 revision='abc123',
803 path_config='kitchen',
804 swarm_out_dir='[SWARM_OUT_DIR]') +
805 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500806 api.path['start_dir'].join('skia'),
807 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400808 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500809 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400810 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500811 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400812 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500813 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400814 ) +
815 api.step_data('symbolized dm', retcode=1)
816 )
817
818 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
819 yield (
820 api.test('failed_get_hashes') +
821 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400822 revision='abc123',
823 path_config='kitchen',
824 swarm_out_dir='[SWARM_OUT_DIR]') +
825 api.path.exists(
826 api.path['start_dir'].join('skia'),
827 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
828 'skimage', 'VERSION'),
829 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
830 'skp', 'VERSION'),
831 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
832 'svg', 'VERSION'),
833 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
834 ) +
835 api.step_data('get uninteresting hashes', retcode=1)
836 )
837
Eric Boren4c7754c2017-04-10 08:19:10 -0400838 builder = 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-GN_Android'
839 yield (
840 api.test('failed_push') +
841 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400842 revision='abc123',
843 path_config='kitchen',
844 swarm_out_dir='[SWARM_OUT_DIR]') +
845 api.path.exists(
846 api.path['start_dir'].join('skia'),
847 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
848 'skimage', 'VERSION'),
849 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
850 'skp', 'VERSION'),
851 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
852 'svg', 'VERSION'),
853 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
854 ) +
855 api.step_data('push [START_DIR]/skia/resources/* '+
856 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
857 )
858
859 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
860 yield (
861 api.test('failed_pull') +
862 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400863 revision='abc123',
864 path_config='kitchen',
865 swarm_out_dir='[SWARM_OUT_DIR]') +
866 api.path.exists(
867 api.path['start_dir'].join('skia'),
868 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
869 'skimage', 'VERSION'),
870 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
871 'skp', 'VERSION'),
872 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
873 'svg', 'VERSION'),
874 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
875 ) +
876 api.step_data('dm', retcode=1) +
877 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
878 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -0700879 )