blob: fe7e496f2a12dfeabd0667bfe3f80aa25525a66f [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 'core',
Eric Boren896af752017-04-24 13:22:56 -040011 'env',
12 'flavor',
Robert Iannucci297a7ef2017-05-12 19:09:38 -070013 'recipe_engine/context',
Robert Iannucci8cd50412017-07-07 14:36:58 -070014 'recipe_engine/file',
Eric Boren4c7754c2017-04-10 08:19:10 -040015 'recipe_engine/json',
borenet1ed2ae42016-07-26 11:52:17 -070016 'recipe_engine/path',
17 'recipe_engine/platform',
18 'recipe_engine/properties',
Eric Boren4c7754c2017-04-10 08:19:10 -040019 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070020 'recipe_engine/raw_io',
Eric Boren4c7754c2017-04-10 08:19:10 -040021 'recipe_engine/step',
Eric Boren4c7754c2017-04-10 08:19:10 -040022 'run',
23 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070024]
25
26
Eric Boren89cd3572017-06-28 13:50:22 -040027def dm_flags(api, bot):
Eric Boren4c7754c2017-04-10 08:19:10 -040028 args = []
Brian Osmanf9810662017-08-30 10:02:10 -040029 configs = []
30 blacklisted = []
31
32 def blacklist(quad):
33 config, src, options, name = quad.split(' ') if type(quad) is str else quad
34 if (config == '_' or
35 config in configs or
36 (config[0] == '~' and config[1:] in configs)):
37 blacklisted.extend([config, src, options, name])
Eric Boren4c7754c2017-04-10 08:19:10 -040038
Mike Klein97d6a7a2017-07-24 10:37:19 -040039 # We've been spending lots of time writing out and especially uploading
40 # .pdfs, but not doing anything further with them. skia:6821
41 args.extend(['--dont_write', 'pdf'])
42
Eric Boren4c7754c2017-04-10 08:19:10 -040043 # This enables non-deterministic random seeding of the GPU FP optimization
Brian Osman7a34dca2017-04-13 13:40:29 -040044 # test.
Ben Wagner6da8f792017-08-10 12:22:56 -040045 # Not Android due to:
Ben Wagner11ab43c2017-08-09 18:05:59 -040046 # - https://skia.googlesource.com/skia/+/
47 # 5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
48 # - https://skia.googlesource.com/skia/+/
49 # ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
Ben Wagner6da8f792017-08-10 12:22:56 -040050 # Not MSAN due to:
51 # - https://skia.googlesource.com/skia/+/
52 # 0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/
53 # flavor/gn_flavor.py#80
54 if 'Android' not in bot and 'MSAN' not in bot:
Ben Wagner11ab43c2017-08-09 18:05:59 -040055 args.append('--randomProcessorTest')
Eric Boren4c7754c2017-04-10 08:19:10 -040056
57 # 32-bit desktop bots tend to run out of memory, because they have relatively
58 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
59 if '-x86-' in bot and not 'NexusPlayer' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040060 args.extend(['--threads', '4'])
Eric Boren4c7754c2017-04-10 08:19:10 -040061
Kevin Lubick2dafbd72017-08-31 10:39:05 -040062 if 'Chromecast' in bot:
63 args.extend(['--threads', '0'])
64
Eric Boren4c7754c2017-04-10 08:19:10 -040065 # Avoid issues with dynamically exceeding resource cache limits.
66 if 'Test' in bot and 'DISCARDABLE' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040067 args.extend(['--threads', '0'])
68
69 # See if staying on the main thread helps skia:6748.
70 if 'Test-iOS' in bot:
71 args.extend(['--threads', '0'])
Eric Boren4c7754c2017-04-10 08:19:10 -040072
Derek Sollenbergeredfe3df2017-07-19 15:25:24 -040073 # Android's kernel will occasionally attempt to kill our process, using
74 # SIGINT, in an effort to free up resources. If requested, that signal
75 # is ignored and dm will keep attempting to proceed until we actually
76 # exhaust the available resources.
77 if ('NexusPlayer' in bot or
78 'Nexus10' in bot or
79 'PixelC' in bot):
80 args.append('--ignoreSigInt')
81
Ben Wagner32fa5102017-08-10 21:25:55 -040082 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
83 args.append('--nogpu')
84
85 # These are the canonical configs that we would ideally run on all bots. We
86 # may opt out or substitute some below for specific bots
87 configs.extend(['8888', 'srgb', 'pdf'])
88
89 # Runs out of memory on Android bots. Everyone else seems fine.
90 if 'Android' in bot:
91 configs.remove('pdf')
92
93 if '-GCE-' in bot:
94 configs.extend(['565'])
95 configs.extend(['f16'])
96 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
97 configs.extend(['lite-8888']) # Experimental display list.
98 configs.extend(['gbr-8888'])
99
100 # NP is running out of RAM when we run all these modes. skia:3255
101 if 'NexusPlayer' not in bot:
102 configs.extend(mode + '-8888' for mode in
103 ['serialize', 'tiles_rt', 'pic'])
104
Ben Wagner32fa5102017-08-10 21:25:55 -0400105 # This bot only differs from vanilla CPU bots in 8888 config.
106 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
107 configs = ['8888', 'srgb']
108
109 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
110 args.append('--nocpu')
111
112 # Add in either gles or gl configs to the canonical set based on OS
113 sample_count = '8'
114 gl_prefix = 'gl'
115 if 'Android' in bot or 'iOS' in bot:
116 sample_count = '4'
117 # We want to test the OpenGL config not the GLES config on the Shield
118 if 'NVIDIA_Shield' not in bot:
119 gl_prefix = 'gles'
120 elif 'Intel' in bot:
121 sample_count = ''
122 elif 'ChromeOS' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400123 gl_prefix = 'gles'
Eric Boren4c7754c2017-04-10 08:19:10 -0400124
Ben Wagner32fa5102017-08-10 21:25:55 -0400125 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400126 if sample_count is not '':
Ben Wagner32fa5102017-08-10 21:25:55 -0400127 configs.append(gl_prefix + 'msaa' + sample_count)
Eric Boren4c7754c2017-04-10 08:19:10 -0400128
Ben Wagner32fa5102017-08-10 21:25:55 -0400129 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
130 # doesn't support it.
131 if ('NexusPlayer' in bot or
132 'Tegra3' in bot or
133 # We aren't interested in fixing msaa bugs on current iOS devices.
134 'iPad4' in bot or
135 'iPadPro' in bot or
136 'iPhone6' in bot or
137 'iPhone7' in bot or
138 # skia:5792
139 'IntelHD530' in bot or
140 'IntelIris540' in bot):
141 configs = [x for x in configs if 'msaa' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400142
Ben Wagner32fa5102017-08-10 21:25:55 -0400143 # The NP produces different images for dft on every run.
144 if 'NexusPlayer' in bot:
145 configs = [x for x in configs if 'dft' not in x]
Eric Boren4c7754c2017-04-10 08:19:10 -0400146
Ben Wagner32fa5102017-08-10 21:25:55 -0400147 if '-TSAN' not in bot and sample_count is not '':
148 if ('TegraK1' in bot or
149 'TegraX1' in bot or
150 'GTX550Ti' in bot or
151 'GTX660' in bot or
152 'QuadroP400' in bot or
153 ('GT610' in bot and 'Ubuntu17' not in bot)):
154 configs.append(gl_prefix + 'nvprdit' + sample_count)
Kevin Lubickae95db42017-04-10 13:05:49 -0400155
Ben Wagner32fa5102017-08-10 21:25:55 -0400156 # We want to test both the OpenGL config and the GLES config on Linux Intel:
157 # GL is used by Chrome, GLES is used by ChromeOS.
Brian Osmanf9810662017-08-30 10:02:10 -0400158 # Also do the Ganesh threading verification test (render with and without
159 # worker threads, using only the SW path renderer, and compare the results).
Ben Wagner32fa5102017-08-10 21:25:55 -0400160 if 'Intel' in bot and api.vars.is_linux:
Brian Osmanf9810662017-08-30 10:02:10 -0400161 configs.extend(['gles', 'glesdft', 'glessrgb', 'gltestthreading'])
162 # skbug.com/6333, skbug.com/6419, skbug.com/6702
163 blacklist('gltestthreading gm _ lcdblendmodes')
164 blacklist('gltestthreading gm _ lcdoverlap')
Brian Osmanbef21ba2017-08-31 13:49:05 -0400165 blacklist('gltestthreading gm _ textbloblooper')
Brian Osman1e75f2a2017-09-07 09:30:44 -0400166 # All of these GMs are flaky, too:
167 blacklist('gltestthreading gm _ bleed_alpha_bmp')
168 blacklist('gltestthreading gm _ bleed_alpha_bmp_shader')
169 blacklist('gltestthreading gm _ bleed_alpha_image')
170 blacklist('gltestthreading gm _ bleed_alpha_image_shader')
171 blacklist('gltestthreading gm _ savelayer_with_backdrop')
172 blacklist('gltestthreading gm _ persp_shaders_bw')
Mike Klein97627d42017-05-11 13:12:48 -0400173
Ben Wagner32fa5102017-08-10 21:25:55 -0400174 # The following devices do not support glessrgb.
175 if 'glessrgb' in configs:
176 if ('IntelHD405' in bot or
177 'IntelIris540' in bot or
Ben Wagnerfef8fdd2017-08-11 14:13:56 -0400178 'IntelIris640' in bot or
Ben Wagner32fa5102017-08-10 21:25:55 -0400179 'IntelBayTrail' in bot or
180 'IntelHD2000' in bot or
181 'AndroidOne' in bot or
182 'Nexus7' in bot or
183 'NexusPlayer' in bot):
184 configs.remove('glessrgb')
185
186 # Test instanced rendering on a limited number of platforms
187 if 'Nexus6' in bot:
188 # inst msaa isn't working yet on Adreno.
189 configs.append(gl_prefix + 'inst')
190 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
191 # Multisampled instanced configs use nvpr so we substitute inst msaa
192 # configs for nvpr msaa configs.
193 old = gl_prefix + 'nvpr'
194 new = gl_prefix + 'inst'
195 configs = [x.replace(old, new) for x in configs]
196 # We also test non-msaa instanced.
197 configs.append(new)
Ben Wagnercc4221b2017-08-17 17:29:04 -0400198 elif 'MacMini7.1' in bot:
Ben Wagner32fa5102017-08-10 21:25:55 -0400199 configs.extend([gl_prefix + 'inst'])
200
201 # CommandBuffer bot *only* runs the command_buffer config.
202 if 'CommandBuffer' in bot:
203 configs = ['commandbuffer']
204
205 # ANGLE bot *only* runs the angle configs
206 if 'ANGLE' in bot:
207 configs = ['angle_d3d11_es2',
208 'angle_d3d9_es2',
209 'angle_gl_es2',
210 'angle_d3d11_es3']
211 if sample_count is not '':
212 configs.append('angle_d3d11_es2_msaa' + sample_count)
213 configs.append('angle_d3d11_es3_msaa' + sample_count)
214
215 # Vulkan bot *only* runs the vk config.
216 if 'Vulkan' in bot:
217 configs = ['vk']
218
219 if 'ChromeOS' in bot:
220 # Just run GLES for now - maybe add gles_msaa4 in the future
221 configs = ['gles']
222
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400223 if 'Chromecast' in bot:
224 configs = ['gles', '8888']
225
Ben Wagner32fa5102017-08-10 21:25:55 -0400226 # Test coverage counting path renderer.
227 if 'CCPR' in bot:
228 configs = [c for c in configs if c == 'gl' or c == 'gles']
229 args.extend(['--pr', 'ccpr'])
Chris Dalton97598a52017-07-18 10:49:07 -0600230
Chris Dalton80ace822017-07-20 10:54:04 -0600231 args.append('--config')
232 args.extend(configs)
233
Eric Boren4c7754c2017-04-10 08:19:10 -0400234 # Run tests, gms, and image decoding tests everywhere.
235 args.extend('--src tests gm image colorImage svg'.split(' '))
236 if 'Vulkan' in bot and 'NexusPlayer' in bot:
237 args.remove('svg')
238 args.remove('image')
Chris Dalton7c304ba2017-09-07 11:57:16 -0600239 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
240 # Don't run the 'svgparse_*' svgs on GPU.
241 blacklist('_ svg _ svgparse_')
242 elif bot == 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN':
243 # Only run the CPU SVGs on 8888.
244 blacklist('~8888 svg _ _')
245 else:
246 # On CPU SVGs we only care about parsing. Only run them on the above bot.
247 args.remove('svg')
Eric Boren4c7754c2017-04-10 08:19:10 -0400248
Mike Klein97627d42017-05-11 13:12:48 -0400249 # Eventually I'd like these to pass, but for now just skip 'em.
250 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
251 args.remove('tests')
252
Eric Boren4c7754c2017-04-10 08:19:10 -0400253 # TODO: ???
254 blacklist('f16 _ _ dstreadshuffle')
255 blacklist('glsrgb image _ _')
256 blacklist('glessrgb image _ _')
257
Eric Boren4c7754c2017-04-10 08:19:10 -0400258 # Not any point to running these.
259 blacklist('gbr-8888 image _ _')
260 blacklist('gbr-8888 colorImage _ _')
261
262 if 'Valgrind' in bot:
263 # These take 18+ hours to run.
264 blacklist('pdf gm _ fontmgr_iter')
265 blacklist('pdf _ _ PANO_20121023_214540.jpg')
266 blacklist('pdf skp _ worldjournal')
267 blacklist('pdf skp _ desk_baidu.skp')
268 blacklist('pdf skp _ desk_wikipedia.skp')
269 blacklist('_ svg _ _')
270
271 if 'iOS' in bot:
272 blacklist(gl_prefix + ' skp _ _')
273
274 if 'Mac' in bot or 'iOS' in bot:
275 # CG fails on questionable bmps
276 blacklist('_ image gen_platf rgba32abf.bmp')
277 blacklist('_ image gen_platf rgb24prof.bmp')
278 blacklist('_ image gen_platf rgb24lprof.bmp')
279 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
280 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
281 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
282 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
283
284 # CG has unpredictable behavior on this questionable gif
285 # It's probably using uninitialized memory
286 blacklist('_ image gen_platf frame_larger_than_image.gif')
287
288 # CG has unpredictable behavior on incomplete pngs
289 # skbug.com/5774
290 blacklist('_ image gen_platf inc0.png')
291 blacklist('_ image gen_platf inc1.png')
292 blacklist('_ image gen_platf inc2.png')
293 blacklist('_ image gen_platf inc3.png')
294 blacklist('_ image gen_platf inc4.png')
295 blacklist('_ image gen_platf inc5.png')
296 blacklist('_ image gen_platf inc6.png')
297 blacklist('_ image gen_platf inc7.png')
298 blacklist('_ image gen_platf inc8.png')
299 blacklist('_ image gen_platf inc9.png')
300 blacklist('_ image gen_platf inc10.png')
301 blacklist('_ image gen_platf inc11.png')
302 blacklist('_ image gen_platf inc12.png')
303 blacklist('_ image gen_platf inc13.png')
304 blacklist('_ image gen_platf inc14.png')
305
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400306 # WIC fails on questionable bmps
Eric Boren4c7754c2017-04-10 08:19:10 -0400307 if 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400308 blacklist('_ image gen_platf pal8os2v2.bmp')
309 blacklist('_ image gen_platf pal8os2v2-16.bmp')
310 blacklist('_ image gen_platf rgba32abf.bmp')
311 blacklist('_ image gen_platf rgb24prof.bmp')
312 blacklist('_ image gen_platf rgb24lprof.bmp')
313 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
314 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
315 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
316 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400317 if 'x86_64' in bot and 'CPU' in bot:
318 # This GM triggers a SkSmallAllocator assert.
319 blacklist('_ gm _ composeshader_bitmap')
320
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400321 if 'Win' in bot or 'Mac' in bot:
Leon Scroggins III3a3cf432017-08-18 13:08:16 -0400322 # WIC and CG fail on arithmetic jpegs
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400323 blacklist('_ image gen_platf testimgari.jpg')
Leon Scroggins III3a3cf432017-08-18 13:08:16 -0400324 # More questionable bmps that fail on Mac, too. skbug.com/6984
325 blacklist('_ image gen_platf rle8-height-negative.bmp')
326 blacklist('_ image gen_platf rle4-height-negative.bmp')
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400327
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400328 if 'Android' in bot or 'iOS' in bot or 'Chromecast' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400329 # This test crashes the N9 (perhaps because of large malloc/frees). It also
330 # is fairly slow and not platform-specific. So we just disable it on all of
331 # Android and iOS. skia:5438
332 blacklist('_ test _ GrShape')
333
Kevin Lubick451b7432017-09-15 14:44:12 -0400334 if api.vars.internal_hardware_label == 1:
335 # skia:7046
336 blacklist('_ test _ WritePixelsNonTexture_Gpu')
337 blacklist('_ test _ WritePixels_Gpu')
338 blacklist('_ test _ GrSurfaceRenderability')
339 blacklist('_ test _ ES2BlendWithNoTexture')
340
341
Eric Boren4c7754c2017-04-10 08:19:10 -0400342 # skia:4095
Mike Reedfb499092017-06-26 13:53:32 +0000343 bad_serialize_gms = ['bleed_image',
Eric Boren4c7754c2017-04-10 08:19:10 -0400344 'c_gms',
345 'colortype',
346 'colortype_xfermodes',
347 'drawfilter',
348 'fontmgr_bounds_0.75_0',
349 'fontmgr_bounds_1_-0.25',
350 'fontmgr_bounds',
351 'fontmgr_match',
352 'fontmgr_iter',
353 'imagemasksubset']
354
355 # skia:5589
356 bad_serialize_gms.extend(['bitmapfilters',
357 'bitmapshaders',
358 'bleed',
359 'bleed_alpha_bmp',
360 'bleed_alpha_bmp_shader',
361 'convex_poly_clip',
362 'extractalpha',
363 'filterbitmap_checkerboard_32_32_g8',
364 'filterbitmap_image_mandrill_64',
365 'shadows',
366 'simpleaaclip_aaclip'])
367 # skia:5595
368 bad_serialize_gms.extend(['composeshader_bitmap',
369 'scaled_tilemodes_npot',
370 'scaled_tilemodes'])
371
372 # skia:5778
373 bad_serialize_gms.append('typefacerendering_pfaMac')
374 # skia:5942
375 bad_serialize_gms.append('parsedpaths')
376
377 # these use a custom image generator which doesn't serialize
378 bad_serialize_gms.append('ImageGeneratorExternal_rect')
379 bad_serialize_gms.append('ImageGeneratorExternal_shader')
380
381 # skia:6189
382 bad_serialize_gms.append('shadow_utils')
383
Matt Sarett9f3dcb32017-05-04 08:53:32 -0400384 # Not expected to round trip encoding/decoding.
385 bad_serialize_gms.append('makecolorspace')
386
Eric Boren4c7754c2017-04-10 08:19:10 -0400387 for test in bad_serialize_gms:
388 blacklist(['serialize-8888', 'gm', '_', test])
389
390 if 'Mac' not in bot:
391 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
392 blacklist(['serialize-8888', 'gm', '_', test])
393 # It looks like we skip these only for out-of-memory concerns.
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400394 if 'Win' in bot or 'Android' in bot or 'Chromecast' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400395 for test in ['verylargebitmap', 'verylarge_picture_image']:
396 blacklist(['serialize-8888', 'gm', '_', test])
Ben Wagner2e4e73f2017-09-08 15:21:44 -0400397 if 'Mac' in bot and 'CPU' in bot:
Ben Wagner38db79f2017-08-23 15:05:50 -0400398 # skia:6992
Ben Wagner6f98bc62017-09-05 16:02:28 -0400399 blacklist(['pic-8888', 'gm', '_', 'encode-platform'])
Ben Wagner38db79f2017-08-23 15:05:50 -0400400 blacklist(['serialize-8888', 'gm', '_', 'encode-platform'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400401
402 # skia:4769
403 for test in ['drawfilter']:
404 blacklist([ 'sp-8888', 'gm', '_', test])
405 blacklist([ 'pic-8888', 'gm', '_', test])
406 blacklist(['2ndpic-8888', 'gm', '_', test])
407 blacklist([ 'lite-8888', 'gm', '_', test])
408 # skia:4703
409 for test in ['image-cacherator-from-picture',
410 'image-cacherator-from-raster',
411 'image-cacherator-from-ctable']:
412 blacklist([ 'sp-8888', 'gm', '_', test])
413 blacklist([ 'pic-8888', 'gm', '_', test])
414 blacklist([ '2ndpic-8888', 'gm', '_', test])
415 blacklist(['serialize-8888', 'gm', '_', test])
416
417 # GM that requires raster-backed canvas
418 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
419 blacklist([ 'sp-8888', 'gm', '_', test])
420 blacklist([ 'pic-8888', 'gm', '_', test])
421 blacklist([ 'lite-8888', 'gm', '_', test])
422 blacklist([ '2ndpic-8888', 'gm', '_', test])
423 blacklist(['serialize-8888', 'gm', '_', test])
424
425 # GM that not support tiles_rt
426 for test in ['complexclip4_bw', 'complexclip4_aa']:
427 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
428
429 # Extensions for RAW images
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400430 r = ['arw', 'cr2', 'dng', 'nef', 'nrw', 'orf', 'raf', 'rw2', 'pef', 'srw',
431 'ARW', 'CR2', 'DNG', 'NEF', 'NRW', 'ORF', 'RAF', 'RW2', 'PEF', 'SRW']
Eric Boren4c7754c2017-04-10 08:19:10 -0400432
433 # skbug.com/4888
434 # Blacklist RAW images (and a few large PNGs) on GPU bots
435 # until we can resolve failures.
Matt Sarett929bfeb2017-05-22 10:34:41 -0400436 if 'GPU' in bot:
437 blacklist('_ image _ interlaced1.png')
438 blacklist('_ image _ interlaced2.png')
439 blacklist('_ image _ interlaced3.png')
440 for raw_ext in r:
441 blacklist('_ image _ .%s' % raw_ext)
442
443 # Blacklist memory intensive tests on 32-bit bots.
444 if ('Win2k8' in bot or 'Win8' in bot) and 'x86-' in bot:
445 blacklist('_ image f16 _')
Matt Sarett112565e2017-05-22 13:45:15 -0400446 blacklist('_ image _ abnormal.wbmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400447 blacklist('_ image _ interlaced1.png')
448 blacklist('_ image _ interlaced2.png')
449 blacklist('_ image _ interlaced3.png')
450 for raw_ext in r:
451 blacklist('_ image _ .%s' % raw_ext)
452
Eric Boren4c7754c2017-04-10 08:19:10 -0400453 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
454 # skia:6331
455 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
456 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
457
458 if 'Nexus5' in bot:
459 # skia:5876
460 blacklist(['_', 'gm', '_', 'encode-platform'])
461
462 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
463 blacklist(['_', 'gm', '_', 'bigblurs'])
464 blacklist(['_', 'gm', '_', 'bleed'])
465 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
466 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
467 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
468 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
469 blacklist(['_', 'gm', '_', 'bleed_image'])
470 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
471 blacklist(['_', 'gm', '_', 'filterfastbounds'])
472 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
473 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
474 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
475 blacklist(['_', 'gm', '_', 'imageresizetiled'])
476 blacklist(['_', 'gm', '_', 'matrixconvolution'])
477 blacklist(['_', 'gm', '_', 'strokedlines'])
478 if sample_count is not '':
479 gl_msaa_config = gl_prefix + 'msaa' + sample_count
480 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
481 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
482
483 match = []
484 if 'Valgrind' in bot: # skia:3021
485 match.append('~Threaded')
486
Ben Wagner6c126422017-06-19 12:45:54 -0400487 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
488 # skia:6575
489 match.append('~multipicturedraw_')
490
Ben Wagnerbb3e7ff2017-04-28 15:28:32 -0400491 if 'CommandBuffer' in bot:
492 # https://crbug.com/697030
493 match.append('~HalfFloatAlphaTextureTest')
494
Eric Boren4c7754c2017-04-10 08:19:10 -0400495 if 'AndroidOne' in bot: # skia:4711
496 match.append('~WritePixels')
497
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400498 if 'Chromecast' in bot: # skia:6581
499 match.append('~matrixconvolution')
500 match.append('~blur_image_filter')
501 match.append('~blur_0.01')
502 match.append('~GM_animated-image-blurs')
503
Eric Boren4c7754c2017-04-10 08:19:10 -0400504 if 'NexusPlayer' in bot:
505 match.append('~ResourceCache')
506
507 if 'Nexus10' in bot:
508 match.append('~CopySurface') # skia:5509
509 match.append('~SRGBReadWritePixels') # skia:6097
510
Eric Boren4c7754c2017-04-10 08:19:10 -0400511 if 'GalaxyS6' in bot:
512 match.append('~SpecialImage') # skia:6338
Brian Osmaneee3c092017-06-15 13:25:10 -0400513 match.append('~skbug6653') # skia:6653
Eric Boren4c7754c2017-04-10 08:19:10 -0400514
515 if 'GalaxyS7_G930A' in bot:
516 match.append('~WritePixels') # skia:6427
517
Eric Boren4c7754c2017-04-10 08:19:10 -0400518 if 'MSAN' in bot:
519 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
520
521 if 'TSAN' in bot:
522 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
523 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
524 '~RGB565TextureTest'])
525
Brian Osmanc49d11e2017-09-22 09:44:35 -0400526 # By default, we test with GPU threading enabled. Leave PixelC devices
527 # running without threads, just to get some coverage of that code path.
528 if 'PixelC' in bot:
529 args.extend(['--gpuThreads', '0'])
530
Ben Wagneradf17dc2017-09-12 23:41:00 -0400531 if 'float_cast_overflow' in bot and 'CPU' in bot:
532 # skia:4632
533 for config in ['565', '8888', 'f16', 'srgb']:
534 blacklist([config, 'gm', '_', 'bigrect'])
535 blacklist([config, 'gm', '_', 'clippedcubic2'])
536 blacklist([config, 'gm', '_', 'conicpaths'])
Ben Wagneradf17dc2017-09-12 23:41:00 -0400537 match.append('~^DashPathEffectTest_asPoints_limit$')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400538 match.append('~^PathBigCubic$')
539 match.append('~^PathOpsCubicIntersection$')
540 match.append('~^PathOpsCubicLineIntersection$')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400541 match.append('~^PathOpsOpCubicsThreaded$')
542 match.append('~^PathOpsOpLoopsThreaded$')
Ben Wagneradf17dc2017-09-12 23:41:00 -0400543
Greg Daniela86385d2017-06-05 11:34:29 -0400544 if 'Vulkan' in bot and 'Adreno530' in bot:
545 # skia:5777
546 match.extend(['~CopySurface'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400547
548 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Ben Wagner407a3b72017-09-07 22:14:07 -0400549 # skia:6132
550 match.extend(['~gradients_no_texture$',
551 '~tilemodes',
552 '~shadertext$',
553 '~bitmapfilters'])
554 match.append('~GrContextFactory_abandon') #skia:6209
555 # skia:7018
556 match.extend(['~ClearOp',
557 '~ComposedImageFilterBounds_Gpu',
558 '~ImageEncode_Gpu',
559 '~ImageFilterFailAffectsTransparentBlack_Gpu',
560 '~ImageFilterZeroBlurSigma_Gpu',
561 '~ImageNewShader_GPU',
562 '~ImageReadPixels_Gpu',
563 '~ImageScalePixels_Gpu',
564 '~OverdrawSurface_Gpu',
565 '~ReadWriteAlpha',
566 '~SpecialImage_DeferredGpu',
567 '~SpecialImage_Gpu',
568 '~SurfaceSemaphores'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400569
Ben Wagnerbe8ad452017-08-11 15:18:03 -0400570 if ('Vulkan' in bot and api.vars.is_linux and
571 ('IntelIris540' in bot or 'IntelIris640' in bot)):
Eric Boren4c7754c2017-04-10 08:19:10 -0400572 match.extend(['~VkHeapTests']) # skia:6245
573
Ben Wagnerf1debdf2017-06-13 13:37:05 -0400574 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400575 # skia:6398
576 blacklist(['vk', 'gm', '_', 'aarectmodes'])
577 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
578 blacklist(['vk', 'gm', '_', 'arithmode'])
579 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
580 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
581 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
582 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
583 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
584 blacklist(['vk', 'gm', '_', 'fontcache'])
585 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
586 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
587 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
588 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
589 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
590 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
591 blacklist(['vk', 'gm', '_', 'gammatextWin'])
592 blacklist(['vk', 'gm', '_', 'gradtext'])
593 blacklist(['vk', 'gm', '_', 'hairmodes'])
594 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
595 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
596 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
597 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
598 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
599 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
600 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
601 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
602 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
603 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
604 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
605 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
606 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
Greg Daniel744d3c52017-06-09 13:50:20 -0400607 blacklist(['vk', 'gm', '_', 'mixershader'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400608 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
609 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
610 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
611 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
612 blacklist(['vk', 'gm', '_', 'srcmode'])
613 blacklist(['vk', 'gm', '_', 'surfaceprops'])
614 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
615 blacklist(['vk', 'gm', '_', 'textbloblooper'])
616 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
617 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
618 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
619 blacklist(['vk', 'gm', '_', 'textfilter_color'])
620 blacklist(['vk', 'gm', '_', 'textfilter_image'])
621 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
622 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
623 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
624 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
625 match.append('~ApplyGamma')
626 match.append('~ComposedImageFilterBounds_Gpu')
Matt Sarett77443972017-04-11 11:25:37 -0400627 match.append('~DeferredTextureImage')
Chris Dalton114a3c02017-05-26 15:17:19 -0600628 match.append('~GrMeshTest')
Eric Boren4c7754c2017-04-10 08:19:10 -0400629 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
630 match.append('~ImageFilterZeroBlurSigma_Gpu')
631 match.append('~ImageNewShader_GPU')
632 match.append('~NewTextureFromPixmap')
633 match.append('~ReadPixels_Gpu')
634 match.append('~ReadPixels_Texture')
635 match.append('~ReadWriteAlpha')
Brian Osmane18ceb12017-06-15 16:04:45 -0400636 match.append('~skbug6653')
Eric Boren4c7754c2017-04-10 08:19:10 -0400637 match.append('~SRGBReadWritePixels')
638 match.append('~SpecialImage_DeferredGpu')
639 match.append('~SpecialImage_Gpu')
640 match.append('~WritePixels_Gpu')
Brian Osman33ea1362017-04-19 10:51:39 -0400641 match.append('~WritePixelsNonTexture_Gpu')
Eric Boren4c7754c2017-04-10 08:19:10 -0400642 match.append('~XfermodeImageFilterCroppedInput_Gpu')
643
644 if 'IntelIris540' in bot and 'ANGLE' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400645 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
Brian Salomon6e554e32017-06-23 12:08:10 -0400646 # skia:6103
Eric Boren4c7754c2017-04-10 08:19:10 -0400647 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
648 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
649 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
650 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
651 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
Brian Salomon6e554e32017-06-23 12:08:10 -0400652 # skia:6141
653 blacklist([config, 'gm', '_', 'discard'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400654
Eric Boren89cd3572017-06-28 13:50:22 -0400655 if 'IntelBayTrail' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400656 match.append('~ImageStorageLoad') # skia:6358
657
Kevin Lubickc14e5a72017-08-15 13:22:19 -0400658 if 'PowerVRGX6250' in bot:
659 match.append('~gradients_view_perspective_nodither') #skia:6972
660
Eric Boren4c7754c2017-04-10 08:19:10 -0400661 if blacklisted:
662 args.append('--blacklist')
663 args.extend(blacklisted)
664
665 if match:
666 args.append('--match')
667 args.extend(match)
668
669 # These bots run out of memory running RAW codec tests. Do not run them in
670 # parallel
671 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
672 or 'Win8-MSVC-ShuttleB' in bot):
673 args.append('--noRAW_threading')
674
Stephan Altmueller74dac542017-09-11 15:32:21 -0400675 # Let's make all bots produce verbose output by default.
676 args.append('--verbose')
Mike Kleinc9089062017-06-26 09:09:32 -0400677
Eric Boren4c7754c2017-04-10 08:19:10 -0400678 return args
679
680
681def key_params(api):
682 """Build a unique key from the builder name (as a list).
683
684 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
685 """
686 # Don't bother to include role, which is always Test.
687 # TryBots are uploaded elsewhere so they can use the same key.
688 blacklist = ['role', 'is_trybot']
689
690 flat = []
691 for k in sorted(api.vars.builder_cfg.keys()):
692 if k not in blacklist:
693 flat.append(k)
694 flat.append(api.vars.builder_cfg[k])
695 return flat
696
697
698def test_steps(api):
699 """Run the DM test."""
700 use_hash_file = False
701 if api.vars.upload_dm_results:
702 # This must run before we write anything into
703 # api.flavor.device_dirs.dm_dir or we may end up deleting our
704 # output on machines where they're the same.
705 api.flavor.create_clean_host_dir(api.vars.dm_dir)
706 host_dm_dir = str(api.vars.dm_dir)
707 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
708 if host_dm_dir != device_dm_dir:
709 api.flavor.create_clean_device_dir(device_dm_dir)
710
711 # Obtain the list of already-generated hashes.
712 hash_filename = 'uninteresting_hashes.txt'
713
714 # Ensure that the tmp_dir exists.
Robert Iannucci8cd50412017-07-07 14:36:58 -0700715 api.run.run_once(api.file.ensure_directory,
716 'makedirs tmp_dir',
717 api.vars.tmp_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400718
719 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
720 hashes_file = api.flavor.device_path_join(
721 api.flavor.device_dirs.tmp_dir, hash_filename)
722 api.run(
723 api.python.inline,
724 'get uninteresting hashes',
725 program="""
726 import contextlib
727 import math
728 import socket
729 import sys
730 import time
731 import urllib2
732
Stephan Altmuellerc19ebc52017-05-30 16:39:17 -0400733 HASHES_URL = 'https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt'
Eric Boren4c7754c2017-04-10 08:19:10 -0400734 RETRIES = 5
735 TIMEOUT = 60
736 WAIT_BASE = 15
737
738 socket.setdefaulttimeout(TIMEOUT)
739 for retry in range(RETRIES):
740 try:
741 with contextlib.closing(
742 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
743 hashes = w.read()
744 with open(sys.argv[1], 'w') as f:
745 f.write(hashes)
746 break
747 except Exception as e:
748 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
749 print e
750 if retry == RETRIES:
751 raise
752 waittime = WAIT_BASE * math.pow(2, retry)
753 print 'Retry in %d seconds.' % waittime
754 time.sleep(waittime)
755 """,
756 args=[host_hashes_file],
757 abort_on_failure=False,
758 fail_build_on_failure=False,
759 infra_step=True)
760
761 if api.path.exists(host_hashes_file):
762 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
763 use_hash_file = True
764
765 # Run DM.
766 properties = [
767 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400768 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400769 ]
770 if api.vars.is_trybot:
771 properties.extend([
772 'issue', api.vars.issue,
773 'patchset', api.vars.patchset,
774 'patch_storage', api.vars.patch_storage,
775 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400776 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
777 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400778
779 args = [
780 'dm',
Eric Boren4c7754c2017-04-10 08:19:10 -0400781 '--resourcePath', api.flavor.device_dirs.resource_dir,
782 '--skps', api.flavor.device_dirs.skp_dir,
783 '--images', api.flavor.device_path_join(
784 api.flavor.device_dirs.images_dir, 'dm'),
785 '--colorImages', api.flavor.device_path_join(
786 api.flavor.device_dirs.images_dir, 'colorspace'),
787 '--nameByHash',
788 '--properties'
789 ] + properties
790
791 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
792
793 args.append('--key')
794 args.extend(key_params(api))
795 if use_hash_file:
796 args.extend(['--uninterestingHashesFile', hashes_file])
797 if api.vars.upload_dm_results:
798 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
799
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400800 if 'Chromecast' in api.vars.builder_cfg.get('os', ''):
801 # Due to limited disk space, we only deal with skps and one image.
802 args = [
803 'dm',
804 '--undefok', # This helps branches that may not know new flags.
805 '--resourcePath', api.flavor.device_dirs.resource_dir,
806 '--skps', api.flavor.device_dirs.skp_dir,
807 '--images', api.flavor.device_path_join(
808 api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'),
809 ]
810
Eric Boren89cd3572017-06-28 13:50:22 -0400811 args.extend(dm_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400812
Eric Boren896af752017-04-24 13:22:56 -0400813 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400814 if 'Ubuntu16' in api.vars.builder_name:
815 # The vulkan in this asset name simply means that the graphics driver
816 # supports Vulkan. It is also the driver used for GL code.
817 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
818 if 'Debug' in api.vars.builder_name:
819 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
820
821 if 'Vulkan' in api.vars.builder_name:
822 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
823 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
824 env.update({
825 'PATH':'%%(PATH)s:%s' % sdk_path,
826 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
827 'LIBGL_DRIVERS_PATH': dri_path,
828 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
829 })
830 else:
831 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
832 env.update({
833 'LD_LIBRARY_PATH': dri_path,
834 'LIBGL_DRIVERS_PATH': dri_path,
835 })
836
837 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400838 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
839 if 'AbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400840 args.append('--abandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400841 if 'PreAbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400842 args.append('--preAbandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400843 if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
Eric Boren6ec17e32017-04-26 14:25:29 -0400844 args.append('--releaseAndAbandonGpuContext')
Eric Boren4c7754c2017-04-10 08:19:10 -0400845
Eric Boren896af752017-04-24 13:22:56 -0400846 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400847 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
848
849 if api.vars.upload_dm_results:
850 # Copy images and JSON to host machine if needed.
851 api.flavor.copy_directory_contents_to_host(
852 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
853
854
borenet1ed2ae42016-07-26 11:52:17 -0700855def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400856 api.core.setup()
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700857 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400858 if 'iOS' in api.vars.builder_name:
859 env['IOS_BUNDLE_ID'] = 'com.google.dm'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400860 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700861 with api.context(env=env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400862 try:
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400863 if 'Chromecast' in api.vars.builder_name:
864 api.flavor.install(resources=True, skps=True)
865 else:
866 api.flavor.install_everything()
Eric Boren4c7754c2017-04-10 08:19:10 -0400867 test_steps(api)
868 finally:
869 api.flavor.cleanup_steps()
870 api.run.check_failure()
871
872
Eric Borenf9aa9e52017-04-10 09:56:10 -0400873TEST_BUILDERS = [
Kevin Lubickfe079d42017-04-12 08:31:48 -0400874 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400875 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
876 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400877 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400878 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400879 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400880 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400881 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan',
882 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400883 'Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400884 'Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
885 'Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400886 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR',
887 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_Vulkan',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400888 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
Kevin Lubickc14e5a72017-08-15 13:22:19 -0400889 'Test-ChromeOS-Clang-Chromebook_CB5_312T-GPU-PowerVRGX6250-arm-Debug',
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400890 'Test-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400891 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN',
892 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN',
893 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow',
894 ('Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release'
895 '-SK_FORCE_RASTER_PIPELINE_BLITTER'),
896 'Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN',
897 'Test-Debian9-GCC-GCE-CPU-AVX2-x86-Debug',
898 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug',
899 ('Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug'
900 '-SK_USE_DISCARDABLE_SCALEDIMAGECACHE'),
Ben Wagner38db79f2017-08-23 15:05:50 -0400901 'Test-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release',
Ben Wagnercc4221b2017-08-17 17:29:04 -0400902 'Test-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Debug-CommandBuffer',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400903 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
904 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
905 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release',
906 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400907 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release'
908 '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'),
909 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release'
910 '-Valgrind_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41'),
911 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release'
912 '-Valgrind_SK_CPU_LIMIT_SSE41'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400913 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400914 ('Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release'
915 '-ReleaseAndAbandonGpuContext'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400916 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE',
917 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
918 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
919 'Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE',
920 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400921 'Test-Win8-MSVC-Golo-CPU-AVX-x86-Debug',
922 'Test-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400923]
borenet1ed2ae42016-07-26 11:52:17 -0700924
925
926def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400927 for builder in TEST_BUILDERS:
928 test = (
929 api.test(builder) +
930 api.properties(buildername=builder,
931 revision='abc123',
932 path_config='kitchen',
933 swarm_out_dir='[SWARM_OUT_DIR]') +
934 api.path.exists(
935 api.path['start_dir'].join('skia'),
936 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
937 'skimage', 'VERSION'),
938 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
939 'skp', 'VERSION'),
940 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
941 'svg', 'VERSION'),
942 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400943 ) +
944 api.step_data('get swarming bot id',
945 stdout=api.raw_io.output('skia-bot-123')) +
946 api.step_data('get swarming task id',
947 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400948 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400949 if 'Win' in builder:
950 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400951
Kevin Lubick2dafbd72017-08-31 10:39:05 -0400952 if 'Chromecast' in builder:
953 test += api.step_data(
954 'read chromecast ip',
955 stdout=api.raw_io.output('192.168.1.2:5555'))
956
Eric Borenf9aa9e52017-04-10 09:56:10 -0400957 if 'ChromeOS' in builder:
958 test += api.step_data(
959 'read chromeos ip',
960 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400961
962
Eric Borenf9aa9e52017-04-10 09:56:10 -0400963 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400964
Kevin Lubickfe079d42017-04-12 08:31:48 -0400965 builder = 'Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release'
966 yield (
967 api.test('trybot') +
968 api.properties(buildername=builder,
969 revision='abc123',
970 path_config='kitchen',
971 swarm_out_dir='[SWARM_OUT_DIR]') +
972 api.properties(patch_storage='gerrit') +
973 api.properties.tryserver(
974 buildername=builder,
975 gerrit_project='skia',
976 gerrit_url='https://skia-review.googlesource.com/',
977 )+
978 api.path.exists(
979 api.path['start_dir'].join('skia'),
980 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
981 'skimage', 'VERSION'),
982 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
983 'skp', 'VERSION'),
984 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
985 'svg', 'VERSION'),
986 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
987 )
988 )
989
Ben Wagner6e0a6b32017-09-26 14:11:15 -0400990 builder = 'Test-Debian9-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700991 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400992 api.test('failed_dm') +
993 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700994 revision='abc123',
995 path_config='kitchen',
996 swarm_out_dir='[SWARM_OUT_DIR]') +
997 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500998 api.path['start_dir'].join('skia'),
999 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001000 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001001 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001002 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001003 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -04001004 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -05001005 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -04001006 ) +
1007 api.step_data('symbolized dm', retcode=1)
1008 )
1009
Ben Wagner6e0a6b32017-09-26 14:11:15 -04001010 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -04001011 yield (
1012 api.test('failed_get_hashes') +
1013 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001014 revision='abc123',
1015 path_config='kitchen',
1016 swarm_out_dir='[SWARM_OUT_DIR]') +
1017 api.path.exists(
1018 api.path['start_dir'].join('skia'),
1019 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1020 'skimage', 'VERSION'),
1021 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1022 'skp', 'VERSION'),
1023 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1024 'svg', 'VERSION'),
1025 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1026 ) +
1027 api.step_data('get uninteresting hashes', retcode=1)
1028 )
1029
Ben Wagner6e0a6b32017-09-26 14:11:15 -04001030 builder = 'Test-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -04001031 yield (
1032 api.test('failed_push') +
1033 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001034 revision='abc123',
1035 path_config='kitchen',
1036 swarm_out_dir='[SWARM_OUT_DIR]') +
1037 api.path.exists(
1038 api.path['start_dir'].join('skia'),
1039 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1040 'skimage', 'VERSION'),
1041 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1042 'skp', 'VERSION'),
1043 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1044 'svg', 'VERSION'),
1045 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1046 ) +
1047 api.step_data('push [START_DIR]/skia/resources/* '+
1048 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
1049 )
1050
1051 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
1052 yield (
1053 api.test('failed_pull') +
1054 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -04001055 revision='abc123',
1056 path_config='kitchen',
1057 swarm_out_dir='[SWARM_OUT_DIR]') +
1058 api.path.exists(
1059 api.path['start_dir'].join('skia'),
1060 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1061 'skimage', 'VERSION'),
1062 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1063 'skp', 'VERSION'),
1064 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1065 'svg', 'VERSION'),
1066 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1067 ) +
1068 api.step_data('dm', retcode=1) +
1069 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
1070 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -07001071 )
Eric Boren053d7a42017-09-15 08:35:31 -04001072
1073 yield (
Kevin Lubick451b7432017-09-15 14:44:12 -04001074 api.test('internal_bot_1') +
Eric Boren053d7a42017-09-15 08:35:31 -04001075 api.properties(buildername=builder,
1076 revision='abc123',
1077 path_config='kitchen',
1078 swarm_out_dir='[SWARM_OUT_DIR]',
Kevin Lubick451b7432017-09-15 14:44:12 -04001079 internal_hardware_label=1) +
Eric Boren053d7a42017-09-15 08:35:31 -04001080 api.path.exists(
1081 api.path['start_dir'].join('skia'),
1082 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1083 'skimage', 'VERSION'),
1084 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1085 'skp', 'VERSION'),
1086 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
1087 'svg', 'VERSION'),
1088 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
1089 )
1090 )