blob: ace307ddf70e0fd4772b8a42ddd577e778a9efcd [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 = []
29
Mike Klein97d6a7a2017-07-24 10:37:19 -040030 # We've been spending lots of time writing out and especially uploading
31 # .pdfs, but not doing anything further with them. skia:6821
32 args.extend(['--dont_write', 'pdf'])
33
Eric Boren4c7754c2017-04-10 08:19:10 -040034 # This enables non-deterministic random seeding of the GPU FP optimization
Brian Osman7a34dca2017-04-13 13:40:29 -040035 # test.
36 args.append('--randomProcessorTest')
Eric Boren4c7754c2017-04-10 08:19:10 -040037
38 # 32-bit desktop bots tend to run out of memory, because they have relatively
39 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
40 if '-x86-' in bot and not 'NexusPlayer' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040041 args.extend(['--threads', '4'])
Eric Boren4c7754c2017-04-10 08:19:10 -040042
43 # Avoid issues with dynamically exceeding resource cache limits.
44 if 'Test' in bot and 'DISCARDABLE' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040045 args.extend(['--threads', '0'])
46
47 # See if staying on the main thread helps skia:6748.
48 if 'Test-iOS' in bot:
49 args.extend(['--threads', '0'])
Eric Boren4c7754c2017-04-10 08:19:10 -040050
Derek Sollenbergeredfe3df2017-07-19 15:25:24 -040051 # Android's kernel will occasionally attempt to kill our process, using
52 # SIGINT, in an effort to free up resources. If requested, that signal
53 # is ignored and dm will keep attempting to proceed until we actually
54 # exhaust the available resources.
55 if ('NexusPlayer' in bot or
56 'Nexus10' in bot or
57 'PixelC' in bot):
58 args.append('--ignoreSigInt')
59
Eric Boren4c7754c2017-04-10 08:19:10 -040060 # These are the canonical configs that we would ideally run on all bots. We
61 # may opt out or substitute some below for specific bots
62 configs = ['8888', 'srgb', 'pdf']
63 # Add in either gles or gl configs to the canonical set based on OS
64 sample_count = '8'
65 gl_prefix = 'gl'
66 if 'Android' in bot or 'iOS' in bot:
67 sample_count = '4'
68 # We want to test the OpenGL config not the GLES config on the Shield
69 if 'NVIDIA_Shield' not in bot:
70 gl_prefix = 'gles'
71 elif 'Intel' in bot:
72 sample_count = ''
73 elif 'ChromeOS' in bot:
74 gl_prefix = 'gles'
75
76 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
77 if sample_count is not '':
78 configs.append(gl_prefix + 'msaa' + sample_count)
79
80 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
81 # doesn't support it.
82 if ('NexusPlayer' in bot or
83 'Tegra3' in bot or
Stephan Altmueller93787322017-04-25 14:40:10 -040084 # We aren't interested in fixing msaa bugs on current iOS devices.
Eric Boren4c7754c2017-04-10 08:19:10 -040085 'iPad4' in bot or
Stephan Altmueller93787322017-04-25 14:40:10 -040086 'iPadPro' in bot or
87 'iPhone6' in bot or
88 'iPhone7' in bot or
Eric Boren4c7754c2017-04-10 08:19:10 -040089 # skia:5792
Robert Phillips985e1922017-05-25 07:56:01 -040090 'IntelHD530' in bot or
Eric Boren4c7754c2017-04-10 08:19:10 -040091 'IntelIris540' in bot):
92 configs = [x for x in configs if 'msaa' not in x]
93
94 # The NP produces different images for dft on every run.
95 if 'NexusPlayer' in bot:
96 configs = [x for x in configs if 'dft' not in x]
97
98 # Runs out of memory on Android bots. Everyone else seems fine.
99 if 'Android' in bot:
100 configs.remove('pdf')
101
102 if '-GCE-' in bot:
103 configs.extend(['565'])
104 configs.extend(['f16'])
105 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
106 configs.extend(['lite-8888']) # Experimental display list.
107 configs.extend(['gbr-8888'])
108
109 if '-TSAN' not in bot and sample_count is not '':
Ben Wagnerab909b52017-08-09 14:41:31 -0400110 if ('TegraK1' in bot or
111 'TegraX1' in bot or
112 'GTX550Ti' in bot or
113 'GTX660' in bot or
114 'GT610' in bot or
115 'QuadroP400' in bot):
Eric Boren4c7754c2017-04-10 08:19:10 -0400116 configs.append(gl_prefix + 'nvprdit' + sample_count)
117
118 # We want to test both the OpenGL config and the GLES config on Linux Intel:
119 # GL is used by Chrome, GLES is used by ChromeOS.
Eric Boren89cd3572017-06-28 13:50:22 -0400120 if 'Intel' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400121 configs.extend(['gles', 'glesdft', 'glessrgb'])
122
123 # NP is running out of RAM when we run all these modes. skia:3255
124 if 'NexusPlayer' not in bot:
125 configs.extend(mode + '-8888' for mode in
126 ['serialize', 'tiles_rt', 'pic'])
127
128 # Test instanced rendering on a limited number of platforms
129 if 'Nexus6' in bot:
130 configs.append(gl_prefix + 'inst') # inst msaa isn't working yet on Adreno.
131 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
132 # Multisampled instanced configs use nvpr so we substitute inst msaa
133 # configs for nvpr msaa configs.
134 old = gl_prefix + 'nvpr'
135 new = gl_prefix + 'inst'
136 configs = [x.replace(old, new) for x in configs]
137 # We also test non-msaa instanced.
138 configs.append(new)
139 elif 'MacMini6.2' in bot and sample_count is not '':
140 configs.extend([gl_prefix + 'inst', gl_prefix + 'inst' + sample_count])
141
142 # CommandBuffer bot *only* runs the command_buffer config.
143 if 'CommandBuffer' in bot:
144 configs = ['commandbuffer']
145
146 # ANGLE bot *only* runs the angle configs
147 if 'ANGLE' in bot:
148 configs = ['angle_d3d11_es2',
149 'angle_d3d9_es2',
Brian Salomon8c865882017-06-22 09:56:24 -0400150 'angle_gl_es2',
151 'angle_d3d11_es3']
Eric Boren4c7754c2017-04-10 08:19:10 -0400152 if sample_count is not '':
153 configs.append('angle_d3d11_es2_msaa' + sample_count)
Brian Salomon8c865882017-06-22 09:56:24 -0400154 configs.append('angle_d3d11_es3_msaa' + sample_count)
Eric Boren4c7754c2017-04-10 08:19:10 -0400155
156 # Vulkan bot *only* runs the vk config.
157 if 'Vulkan' in bot:
158 configs = ['vk']
159
160 if 'ChromeOS' in bot:
161 # Just run GLES for now - maybe add gles_msaa4 in the future
162 configs = ['gles']
163
Kevin Lubickae95db42017-04-10 13:05:49 -0400164 if 'Ci20' in bot:
165 # This bot is really slow, cut it down to just 8888.
166 configs = ['8888']
167
Mike Klein97627d42017-05-11 13:12:48 -0400168 # This bot only differs from vanilla CPU bots in 8888 config.
169 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
Mike Kleinf6ca16e2017-05-24 14:08:33 -0400170 configs = ['8888', 'srgb']
Mike Klein97627d42017-05-11 13:12:48 -0400171
Chris Dalton97598a52017-07-18 10:49:07 -0600172 # Test coverage counting path renderer.
173 if 'CCPR' in bot:
Chris Dalton80ace822017-07-20 10:54:04 -0600174 configs = [c for c in configs if c == 'gl' or c == 'gles']
Chris Dalton97598a52017-07-18 10:49:07 -0600175 args.extend(['--pr', 'ccpr'])
176
Chris Dalton80ace822017-07-20 10:54:04 -0600177 args.append('--config')
178 args.extend(configs)
179
Eric Boren4c7754c2017-04-10 08:19:10 -0400180 # Run tests, gms, and image decoding tests everywhere.
181 args.extend('--src tests gm image colorImage svg'.split(' '))
182 if 'Vulkan' in bot and 'NexusPlayer' in bot:
183 args.remove('svg')
184 args.remove('image')
185
Mike Klein97627d42017-05-11 13:12:48 -0400186 # Eventually I'd like these to pass, but for now just skip 'em.
187 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
188 args.remove('tests')
189
Eric Boren4c7754c2017-04-10 08:19:10 -0400190 blacklisted = []
191 def blacklist(quad):
192 config, src, options, name = quad.split(' ') if type(quad) is str else quad
193 if config == '_' or config in configs:
194 blacklisted.extend([config, src, options, name])
195
196 # TODO: ???
197 blacklist('f16 _ _ dstreadshuffle')
198 blacklist('glsrgb image _ _')
199 blacklist('glessrgb image _ _')
200
Eric Boren4c7754c2017-04-10 08:19:10 -0400201 # Not any point to running these.
202 blacklist('gbr-8888 image _ _')
203 blacklist('gbr-8888 colorImage _ _')
204
205 if 'Valgrind' in bot:
206 # These take 18+ hours to run.
207 blacklist('pdf gm _ fontmgr_iter')
208 blacklist('pdf _ _ PANO_20121023_214540.jpg')
209 blacklist('pdf skp _ worldjournal')
210 blacklist('pdf skp _ desk_baidu.skp')
211 blacklist('pdf skp _ desk_wikipedia.skp')
212 blacklist('_ svg _ _')
213
214 if 'iOS' in bot:
215 blacklist(gl_prefix + ' skp _ _')
216
217 if 'Mac' in bot or 'iOS' in bot:
218 # CG fails on questionable bmps
219 blacklist('_ image gen_platf rgba32abf.bmp')
220 blacklist('_ image gen_platf rgb24prof.bmp')
221 blacklist('_ image gen_platf rgb24lprof.bmp')
222 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
223 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
224 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
225 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
226
227 # CG has unpredictable behavior on this questionable gif
228 # It's probably using uninitialized memory
229 blacklist('_ image gen_platf frame_larger_than_image.gif')
230
231 # CG has unpredictable behavior on incomplete pngs
232 # skbug.com/5774
233 blacklist('_ image gen_platf inc0.png')
234 blacklist('_ image gen_platf inc1.png')
235 blacklist('_ image gen_platf inc2.png')
236 blacklist('_ image gen_platf inc3.png')
237 blacklist('_ image gen_platf inc4.png')
238 blacklist('_ image gen_platf inc5.png')
239 blacklist('_ image gen_platf inc6.png')
240 blacklist('_ image gen_platf inc7.png')
241 blacklist('_ image gen_platf inc8.png')
242 blacklist('_ image gen_platf inc9.png')
243 blacklist('_ image gen_platf inc10.png')
244 blacklist('_ image gen_platf inc11.png')
245 blacklist('_ image gen_platf inc12.png')
246 blacklist('_ image gen_platf inc13.png')
247 blacklist('_ image gen_platf inc14.png')
248
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400249 # WIC fails on questionable bmps
Eric Boren4c7754c2017-04-10 08:19:10 -0400250 if 'Win' in bot:
251 blacklist('_ image gen_platf rle8-height-negative.bmp')
252 blacklist('_ image gen_platf rle4-height-negative.bmp')
253 blacklist('_ image gen_platf pal8os2v2.bmp')
254 blacklist('_ image gen_platf pal8os2v2-16.bmp')
255 blacklist('_ image gen_platf rgba32abf.bmp')
256 blacklist('_ image gen_platf rgb24prof.bmp')
257 blacklist('_ image gen_platf rgb24lprof.bmp')
258 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
259 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
260 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
261 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400262 if 'x86_64' in bot and 'CPU' in bot:
263 # This GM triggers a SkSmallAllocator assert.
264 blacklist('_ gm _ composeshader_bitmap')
265
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400266 # WIC and CG fail on arithmetic jpegs
267 if 'Win' in bot or 'Mac' in bot:
268 blacklist('_ image gen_platf testimgari.jpg')
269
Eric Boren4c7754c2017-04-10 08:19:10 -0400270 if 'Android' in bot or 'iOS' in bot:
271 # This test crashes the N9 (perhaps because of large malloc/frees). It also
272 # is fairly slow and not platform-specific. So we just disable it on all of
273 # Android and iOS. skia:5438
274 blacklist('_ test _ GrShape')
275
Eric Boren4c7754c2017-04-10 08:19:10 -0400276 # skia:4095
Mike Reedfb499092017-06-26 13:53:32 +0000277 bad_serialize_gms = ['bleed_image',
Eric Boren4c7754c2017-04-10 08:19:10 -0400278 'c_gms',
279 'colortype',
280 'colortype_xfermodes',
281 'drawfilter',
282 'fontmgr_bounds_0.75_0',
283 'fontmgr_bounds_1_-0.25',
284 'fontmgr_bounds',
285 'fontmgr_match',
286 'fontmgr_iter',
287 'imagemasksubset']
288
289 # skia:5589
290 bad_serialize_gms.extend(['bitmapfilters',
291 'bitmapshaders',
292 'bleed',
293 'bleed_alpha_bmp',
294 'bleed_alpha_bmp_shader',
295 'convex_poly_clip',
296 'extractalpha',
297 'filterbitmap_checkerboard_32_32_g8',
298 'filterbitmap_image_mandrill_64',
299 'shadows',
300 'simpleaaclip_aaclip'])
301 # skia:5595
302 bad_serialize_gms.extend(['composeshader_bitmap',
303 'scaled_tilemodes_npot',
304 'scaled_tilemodes'])
305
306 # skia:5778
307 bad_serialize_gms.append('typefacerendering_pfaMac')
308 # skia:5942
309 bad_serialize_gms.append('parsedpaths')
310
311 # these use a custom image generator which doesn't serialize
312 bad_serialize_gms.append('ImageGeneratorExternal_rect')
313 bad_serialize_gms.append('ImageGeneratorExternal_shader')
314
315 # skia:6189
316 bad_serialize_gms.append('shadow_utils')
317
Matt Sarett9f3dcb32017-05-04 08:53:32 -0400318 # Not expected to round trip encoding/decoding.
319 bad_serialize_gms.append('makecolorspace')
320
Eric Boren4c7754c2017-04-10 08:19:10 -0400321 for test in bad_serialize_gms:
322 blacklist(['serialize-8888', 'gm', '_', test])
323
324 if 'Mac' not in bot:
325 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
326 blacklist(['serialize-8888', 'gm', '_', test])
327 # It looks like we skip these only for out-of-memory concerns.
328 if 'Win' in bot or 'Android' in bot:
329 for test in ['verylargebitmap', 'verylarge_picture_image']:
330 blacklist(['serialize-8888', 'gm', '_', test])
331
332 # skia:4769
333 for test in ['drawfilter']:
334 blacklist([ 'sp-8888', 'gm', '_', test])
335 blacklist([ 'pic-8888', 'gm', '_', test])
336 blacklist(['2ndpic-8888', 'gm', '_', test])
337 blacklist([ 'lite-8888', 'gm', '_', test])
338 # skia:4703
339 for test in ['image-cacherator-from-picture',
340 'image-cacherator-from-raster',
341 'image-cacherator-from-ctable']:
342 blacklist([ 'sp-8888', 'gm', '_', test])
343 blacklist([ 'pic-8888', 'gm', '_', test])
344 blacklist([ '2ndpic-8888', 'gm', '_', test])
345 blacklist(['serialize-8888', 'gm', '_', test])
346
347 # GM that requires raster-backed canvas
348 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
349 blacklist([ 'sp-8888', 'gm', '_', test])
350 blacklist([ 'pic-8888', 'gm', '_', test])
351 blacklist([ 'lite-8888', 'gm', '_', test])
352 blacklist([ '2ndpic-8888', 'gm', '_', test])
353 blacklist(['serialize-8888', 'gm', '_', test])
354
355 # GM that not support tiles_rt
356 for test in ['complexclip4_bw', 'complexclip4_aa']:
357 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
358
359 # Extensions for RAW images
360 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
361 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
362
363 # skbug.com/4888
364 # Blacklist RAW images (and a few large PNGs) on GPU bots
365 # until we can resolve failures.
Matt Sarett929bfeb2017-05-22 10:34:41 -0400366 if 'GPU' in bot:
367 blacklist('_ image _ interlaced1.png')
368 blacklist('_ image _ interlaced2.png')
369 blacklist('_ image _ interlaced3.png')
370 for raw_ext in r:
371 blacklist('_ image _ .%s' % raw_ext)
372
373 # Blacklist memory intensive tests on 32-bit bots.
374 if ('Win2k8' in bot or 'Win8' in bot) and 'x86-' in bot:
375 blacklist('_ image f16 _')
Matt Sarett112565e2017-05-22 13:45:15 -0400376 blacklist('_ image _ abnormal.wbmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400377 blacklist('_ image _ interlaced1.png')
378 blacklist('_ image _ interlaced2.png')
379 blacklist('_ image _ interlaced3.png')
380 for raw_ext in r:
381 blacklist('_ image _ .%s' % raw_ext)
382
Eric Boren4c7754c2017-04-10 08:19:10 -0400383 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
384 # skia:6331
385 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
386 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
387
388 if 'Nexus5' in bot:
389 # skia:5876
390 blacklist(['_', 'gm', '_', 'encode-platform'])
391
392 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
393 blacklist(['_', 'gm', '_', 'bigblurs'])
394 blacklist(['_', 'gm', '_', 'bleed'])
395 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
396 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
397 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
398 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
399 blacklist(['_', 'gm', '_', 'bleed_image'])
400 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
401 blacklist(['_', 'gm', '_', 'filterfastbounds'])
402 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
403 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
404 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
405 blacklist(['_', 'gm', '_', 'imageresizetiled'])
406 blacklist(['_', 'gm', '_', 'matrixconvolution'])
407 blacklist(['_', 'gm', '_', 'strokedlines'])
408 if sample_count is not '':
409 gl_msaa_config = gl_prefix + 'msaa' + sample_count
410 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
411 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
412
413 match = []
414 if 'Valgrind' in bot: # skia:3021
415 match.append('~Threaded')
416
Ben Wagner6c126422017-06-19 12:45:54 -0400417 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
418 # skia:6575
419 match.append('~multipicturedraw_')
420
Ben Wagnerbb3e7ff2017-04-28 15:28:32 -0400421 if 'CommandBuffer' in bot:
422 # https://crbug.com/697030
423 match.append('~HalfFloatAlphaTextureTest')
424
Eric Boren4c7754c2017-04-10 08:19:10 -0400425 if 'AndroidOne' in bot: # skia:4711
426 match.append('~WritePixels')
427
428 if 'NexusPlayer' in bot:
429 match.append('~ResourceCache')
430
431 if 'Nexus10' in bot:
432 match.append('~CopySurface') # skia:5509
433 match.append('~SRGBReadWritePixels') # skia:6097
434
Eric Boren4c7754c2017-04-10 08:19:10 -0400435 if 'GalaxyS6' in bot:
436 match.append('~SpecialImage') # skia:6338
Brian Osmaneee3c092017-06-15 13:25:10 -0400437 match.append('~skbug6653') # skia:6653
Eric Boren4c7754c2017-04-10 08:19:10 -0400438
439 if 'GalaxyS7_G930A' in bot:
440 match.append('~WritePixels') # skia:6427
441
Eric Boren4c7754c2017-04-10 08:19:10 -0400442 if 'MSAN' in bot:
443 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
444
445 if 'TSAN' in bot:
446 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
447 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
448 '~RGB565TextureTest'])
449
Greg Daniela86385d2017-06-05 11:34:29 -0400450 if 'Vulkan' in bot and 'Adreno530' in bot:
451 # skia:5777
452 match.extend(['~CopySurface'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400453
454 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel98fae702017-06-05 09:22:46 -0400455 match.extend(['~gradients_no_texture$', # skia:6132
Eric Boren4c7754c2017-04-10 08:19:10 -0400456 '~tilemodes', # skia:6132
457 '~shadertext$', # skia:6132
458 '~bitmapfilters', # skia:6132
459 '~GrContextFactory_abandon']) #skia:6209
460
Eric Boren89cd3572017-06-28 13:50:22 -0400461 if 'Vulkan' in bot and 'IntelIris540' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400462 match.extend(['~VkHeapTests']) # skia:6245
463
Ben Wagnerf1debdf2017-06-13 13:37:05 -0400464 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400465 # skia:6398
466 blacklist(['vk', 'gm', '_', 'aarectmodes'])
467 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
468 blacklist(['vk', 'gm', '_', 'arithmode'])
469 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
470 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
471 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
472 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
473 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
474 blacklist(['vk', 'gm', '_', 'fontcache'])
475 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
476 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
477 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
478 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
479 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
480 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
481 blacklist(['vk', 'gm', '_', 'gammatextWin'])
482 blacklist(['vk', 'gm', '_', 'gradtext'])
483 blacklist(['vk', 'gm', '_', 'hairmodes'])
484 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
485 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
486 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
487 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
488 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
489 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
490 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
491 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
492 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
493 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
494 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
495 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
496 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
Greg Daniel744d3c52017-06-09 13:50:20 -0400497 blacklist(['vk', 'gm', '_', 'mixershader'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400498 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
499 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
500 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
501 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
502 blacklist(['vk', 'gm', '_', 'srcmode'])
503 blacklist(['vk', 'gm', '_', 'surfaceprops'])
504 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
505 blacklist(['vk', 'gm', '_', 'textbloblooper'])
506 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
507 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
508 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
509 blacklist(['vk', 'gm', '_', 'textfilter_color'])
510 blacklist(['vk', 'gm', '_', 'textfilter_image'])
511 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
512 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
513 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
514 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
515 match.append('~ApplyGamma')
516 match.append('~ComposedImageFilterBounds_Gpu')
Matt Sarett77443972017-04-11 11:25:37 -0400517 match.append('~DeferredTextureImage')
Chris Dalton114a3c02017-05-26 15:17:19 -0600518 match.append('~GrMeshTest')
Eric Boren4c7754c2017-04-10 08:19:10 -0400519 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
520 match.append('~ImageFilterZeroBlurSigma_Gpu')
521 match.append('~ImageNewShader_GPU')
522 match.append('~NewTextureFromPixmap')
523 match.append('~ReadPixels_Gpu')
524 match.append('~ReadPixels_Texture')
525 match.append('~ReadWriteAlpha')
Brian Osmane18ceb12017-06-15 16:04:45 -0400526 match.append('~skbug6653')
Eric Boren4c7754c2017-04-10 08:19:10 -0400527 match.append('~SRGBReadWritePixels')
528 match.append('~SpecialImage_DeferredGpu')
529 match.append('~SpecialImage_Gpu')
530 match.append('~WritePixels_Gpu')
Brian Osman33ea1362017-04-19 10:51:39 -0400531 match.append('~WritePixelsNonTexture_Gpu')
Eric Boren4c7754c2017-04-10 08:19:10 -0400532 match.append('~XfermodeImageFilterCroppedInput_Gpu')
533
534 if 'IntelIris540' in bot and 'ANGLE' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400535 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
Brian Salomon6e554e32017-06-23 12:08:10 -0400536 # skia:6103
Eric Boren4c7754c2017-04-10 08:19:10 -0400537 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
538 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
539 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
540 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
541 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
Brian Salomon6e554e32017-06-23 12:08:10 -0400542 # skia:6141
543 blacklist([config, 'gm', '_', 'discard'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400544
Eric Boren89cd3572017-06-28 13:50:22 -0400545 if 'IntelBayTrail' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400546 match.append('~ImageStorageLoad') # skia:6358
547
Kevin Lubickae95db42017-04-10 13:05:49 -0400548 if 'Ci20' in bot:
549 match.append('~Codec_Dimensions') # skia:6477
550 match.append('~FontMgrAndroidParser') # skia:6478
551 match.append('~PathOpsSimplify') # skia:6479
552 blacklist(['_', 'gm', '_', 'fast_slow_blurimagefilter']) # skia:6480
553
Eric Boren4c7754c2017-04-10 08:19:10 -0400554 if blacklisted:
555 args.append('--blacklist')
556 args.extend(blacklisted)
557
558 if match:
559 args.append('--match')
560 args.extend(match)
561
562 # These bots run out of memory running RAW codec tests. Do not run them in
563 # parallel
564 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
565 or 'Win8-MSVC-ShuttleB' in bot):
566 args.append('--noRAW_threading')
567
Stephan Altmuellere86af692017-07-21 10:12:45 -0400568 # Some people don't like verbose output.
569 verbose = False
570
571 if 'Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot:
572 # TODO(dogben): Track down what's causing bots to die.
573 verbose = True
574
Ben Wagner40c0f242017-04-28 15:55:35 -0400575 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
Ben Wagner47ac0242017-06-27 13:44:36 -0400576 verbose = True
Ben Wagner40c0f242017-04-28 15:55:35 -0400577
Mike Kleinc9089062017-06-26 09:09:32 -0400578 if 'NexusPlayer' in bot and 'CPU' in bot:
579 # The Nexus Player's image decoding tests are slow enough that swarming
580 # times it out for not printing anything frequently enough. --verbose
581 # makes dm print something every time we start or complete a task.
Ben Wagner47ac0242017-06-27 13:44:36 -0400582 verbose = True
583
Stephan Altmuellere86af692017-07-21 10:12:45 -0400584 if 'Android' in bot or 'iOS' in bot:
585 # Enable verbose output on mobile platforms.
586 verbose = True
587
Ben Wagner47ac0242017-06-27 13:44:36 -0400588 if verbose:
Mike Kleinc9089062017-06-26 09:09:32 -0400589 args.append('--verbose')
590
Eric Boren4c7754c2017-04-10 08:19:10 -0400591 return args
592
593
594def key_params(api):
595 """Build a unique key from the builder name (as a list).
596
597 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
598 """
599 # Don't bother to include role, which is always Test.
600 # TryBots are uploaded elsewhere so they can use the same key.
601 blacklist = ['role', 'is_trybot']
602
603 flat = []
604 for k in sorted(api.vars.builder_cfg.keys()):
605 if k not in blacklist:
606 flat.append(k)
607 flat.append(api.vars.builder_cfg[k])
608 return flat
609
610
611def test_steps(api):
612 """Run the DM test."""
613 use_hash_file = False
614 if api.vars.upload_dm_results:
615 # This must run before we write anything into
616 # api.flavor.device_dirs.dm_dir or we may end up deleting our
617 # output on machines where they're the same.
618 api.flavor.create_clean_host_dir(api.vars.dm_dir)
619 host_dm_dir = str(api.vars.dm_dir)
620 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
621 if host_dm_dir != device_dm_dir:
622 api.flavor.create_clean_device_dir(device_dm_dir)
623
624 # Obtain the list of already-generated hashes.
625 hash_filename = 'uninteresting_hashes.txt'
626
627 # Ensure that the tmp_dir exists.
Robert Iannucci8cd50412017-07-07 14:36:58 -0700628 api.run.run_once(api.file.ensure_directory,
629 'makedirs tmp_dir',
630 api.vars.tmp_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400631
632 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
633 hashes_file = api.flavor.device_path_join(
634 api.flavor.device_dirs.tmp_dir, hash_filename)
635 api.run(
636 api.python.inline,
637 'get uninteresting hashes',
638 program="""
639 import contextlib
640 import math
641 import socket
642 import sys
643 import time
644 import urllib2
645
Stephan Altmuellerc19ebc52017-05-30 16:39:17 -0400646 HASHES_URL = 'https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt'
Eric Boren4c7754c2017-04-10 08:19:10 -0400647 RETRIES = 5
648 TIMEOUT = 60
649 WAIT_BASE = 15
650
651 socket.setdefaulttimeout(TIMEOUT)
652 for retry in range(RETRIES):
653 try:
654 with contextlib.closing(
655 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
656 hashes = w.read()
657 with open(sys.argv[1], 'w') as f:
658 f.write(hashes)
659 break
660 except Exception as e:
661 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
662 print e
663 if retry == RETRIES:
664 raise
665 waittime = WAIT_BASE * math.pow(2, retry)
666 print 'Retry in %d seconds.' % waittime
667 time.sleep(waittime)
668 """,
669 args=[host_hashes_file],
670 abort_on_failure=False,
671 fail_build_on_failure=False,
672 infra_step=True)
673
674 if api.path.exists(host_hashes_file):
675 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
676 use_hash_file = True
677
678 # Run DM.
679 properties = [
680 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400681 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400682 ]
683 if api.vars.is_trybot:
684 properties.extend([
685 'issue', api.vars.issue,
686 'patchset', api.vars.patchset,
687 'patch_storage', api.vars.patch_storage,
688 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400689 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
690 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400691
692 args = [
693 'dm',
694 '--undefok', # This helps branches that may not know new flags.
695 '--resourcePath', api.flavor.device_dirs.resource_dir,
696 '--skps', api.flavor.device_dirs.skp_dir,
697 '--images', api.flavor.device_path_join(
698 api.flavor.device_dirs.images_dir, 'dm'),
699 '--colorImages', api.flavor.device_path_join(
700 api.flavor.device_dirs.images_dir, 'colorspace'),
701 '--nameByHash',
702 '--properties'
703 ] + properties
704
705 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
706
707 args.append('--key')
708 args.extend(key_params(api))
709 if use_hash_file:
710 args.extend(['--uninterestingHashesFile', hashes_file])
711 if api.vars.upload_dm_results:
712 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
713
714 skip_flag = None
715 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
716 skip_flag = '--nogpu'
717 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
718 skip_flag = '--nocpu'
719 if skip_flag:
720 args.append(skip_flag)
Eric Boren89cd3572017-06-28 13:50:22 -0400721 args.extend(dm_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400722
Eric Boren896af752017-04-24 13:22:56 -0400723 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400724 if 'Ubuntu16' in api.vars.builder_name:
725 # The vulkan in this asset name simply means that the graphics driver
726 # supports Vulkan. It is also the driver used for GL code.
727 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
728 if 'Debug' in api.vars.builder_name:
729 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
730
731 if 'Vulkan' in api.vars.builder_name:
732 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
733 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
734 env.update({
735 'PATH':'%%(PATH)s:%s' % sdk_path,
736 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
737 'LIBGL_DRIVERS_PATH': dri_path,
738 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
739 })
740 else:
741 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
742 env.update({
743 'LD_LIBRARY_PATH': dri_path,
744 'LIBGL_DRIVERS_PATH': dri_path,
745 })
746
747 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400748 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
749 if 'AbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400750 args.append('--abandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400751 if 'PreAbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400752 args.append('--preAbandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400753 if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
Eric Boren6ec17e32017-04-26 14:25:29 -0400754 args.append('--releaseAndAbandonGpuContext')
Eric Boren4c7754c2017-04-10 08:19:10 -0400755
Eric Boren896af752017-04-24 13:22:56 -0400756 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400757 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
758
759 if api.vars.upload_dm_results:
760 # Copy images and JSON to host machine if needed.
761 api.flavor.copy_directory_contents_to_host(
762 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
763
764
borenet1ed2ae42016-07-26 11:52:17 -0700765def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400766 api.core.setup()
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700767 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400768 if 'iOS' in api.vars.builder_name:
769 env['IOS_BUNDLE_ID'] = 'com.google.dm'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400770 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700771 with api.context(env=env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400772 try:
773 api.flavor.install_everything()
774 test_steps(api)
775 finally:
776 api.flavor.cleanup_steps()
777 api.run.check_failure()
778
779
Eric Borenf9aa9e52017-04-10 09:56:10 -0400780TEST_BUILDERS = [
Kevin Lubickfe079d42017-04-12 08:31:48 -0400781 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android',
Kevin Lubickae95db42017-04-10 13:05:49 -0400782 'Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400783 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
784 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400785 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android',
Chris Dalton80ace822017-07-20 10:54:04 -0600786 "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR",
Kevin Lubickfe079d42017-04-12 08:31:48 -0400787 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400788 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400789 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan',
Greg Daniela86385d2017-06-05 11:34:29 -0400790 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_Vulkan',
Chris Dalton80ace822017-07-20 10:54:04 -0600791 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400792 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android',
793 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-Android',
794 'Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
795 'Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400796 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400797 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
Robert Phillips985e1922017-05-25 07:56:01 -0400798 'Test-Mac-Clang-MacMini6.2-GPU-IntelHD4000-x86_64-Debug-CommandBuffer',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400799 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN',
800 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN',
801 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400802 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
803 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400804 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
805 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
806 '_AbandonGpuContext'),
807 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
808 '_PreAbandonGpuContext'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400809 ('Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_' +
810 'SCALEDIMAGECACHE'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400811 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
812 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
813 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release',
814 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
Ben Wagnerab909b52017-08-09 14:41:31 -0400815 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-Valgrind' +
816 '_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Leon Scroggins IIIbb8126d2017-05-02 11:14:31 -0400817 'Test-Win8-MSVC-Golo-CPU-AVX-x86-Debug',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400818 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
Eric Boren6ec17e32017-04-26 14:25:29 -0400819 ('Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-'
820 'ReleaseAndAbandonGpuContext'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400821 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE',
822 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
823 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
824 'Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE',
825 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
826 'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release',
Mike Klein97627d42017-05-11 13:12:48 -0400827 ('Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-'
828 'SK_FORCE_RASTER_PIPELINE_BLITTER'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400829]
borenet1ed2ae42016-07-26 11:52:17 -0700830
831
832def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400833 for builder in TEST_BUILDERS:
834 test = (
835 api.test(builder) +
836 api.properties(buildername=builder,
837 revision='abc123',
838 path_config='kitchen',
839 swarm_out_dir='[SWARM_OUT_DIR]') +
840 api.path.exists(
841 api.path['start_dir'].join('skia'),
842 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
843 'skimage', 'VERSION'),
844 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
845 'skp', 'VERSION'),
846 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
847 'svg', 'VERSION'),
848 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400849 ) +
850 api.step_data('get swarming bot id',
851 stdout=api.raw_io.output('skia-bot-123')) +
852 api.step_data('get swarming task id',
853 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400854 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400855 if 'Win' in builder:
856 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400857
Eric Borenf9aa9e52017-04-10 09:56:10 -0400858 if 'ChromeOS' in builder:
859 test += api.step_data(
860 'read chromeos ip',
861 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400862
863
Eric Borenf9aa9e52017-04-10 09:56:10 -0400864 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400865
Kevin Lubickfe079d42017-04-12 08:31:48 -0400866 builder = 'Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release'
867 yield (
868 api.test('trybot') +
869 api.properties(buildername=builder,
870 revision='abc123',
871 path_config='kitchen',
872 swarm_out_dir='[SWARM_OUT_DIR]') +
873 api.properties(patch_storage='gerrit') +
874 api.properties.tryserver(
875 buildername=builder,
876 gerrit_project='skia',
877 gerrit_url='https://skia-review.googlesource.com/',
878 )+
879 api.path.exists(
880 api.path['start_dir'].join('skia'),
881 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
882 'skimage', 'VERSION'),
883 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
884 'skp', 'VERSION'),
885 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
886 'svg', 'VERSION'),
887 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
888 )
889 )
890
Eric Boren4c7754c2017-04-10 08:19:10 -0400891 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700892 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400893 api.test('failed_dm') +
894 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700895 revision='abc123',
896 path_config='kitchen',
897 swarm_out_dir='[SWARM_OUT_DIR]') +
898 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500899 api.path['start_dir'].join('skia'),
900 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400901 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500902 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400903 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500904 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400905 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500906 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400907 ) +
908 api.step_data('symbolized dm', retcode=1)
909 )
910
Kevin Lubickfe079d42017-04-12 08:31:48 -0400911 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400912 yield (
913 api.test('failed_get_hashes') +
914 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400915 revision='abc123',
916 path_config='kitchen',
917 swarm_out_dir='[SWARM_OUT_DIR]') +
918 api.path.exists(
919 api.path['start_dir'].join('skia'),
920 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
921 'skimage', 'VERSION'),
922 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
923 'skp', 'VERSION'),
924 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
925 'svg', 'VERSION'),
926 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
927 ) +
928 api.step_data('get uninteresting hashes', retcode=1)
929 )
930
Kevin Lubickfe079d42017-04-12 08:31:48 -0400931 builder = 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400932 yield (
933 api.test('failed_push') +
934 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400935 revision='abc123',
936 path_config='kitchen',
937 swarm_out_dir='[SWARM_OUT_DIR]') +
938 api.path.exists(
939 api.path['start_dir'].join('skia'),
940 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
941 'skimage', 'VERSION'),
942 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
943 'skp', 'VERSION'),
944 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
945 'svg', 'VERSION'),
946 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
947 ) +
948 api.step_data('push [START_DIR]/skia/resources/* '+
949 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
950 )
951
952 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
953 yield (
954 api.test('failed_pull') +
955 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400956 revision='abc123',
957 path_config='kitchen',
958 swarm_out_dir='[SWARM_OUT_DIR]') +
959 api.path.exists(
960 api.path['start_dir'].join('skia'),
961 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
962 'skimage', 'VERSION'),
963 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
964 'skp', 'VERSION'),
965 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
966 'svg', 'VERSION'),
967 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
968 ) +
969 api.step_data('dm', retcode=1) +
970 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
971 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -0700972 )