blob: 5ea17d432a51fa6c0ce7eba84c3f383977094f2a [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.
Ben Wagner11ab43c2017-08-09 18:05:59 -040036 # Not Android due to :
37 # - https://skia.googlesource.com/skia/+/
38 # 5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
39 # - https://skia.googlesource.com/skia/+/
40 # ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
41 if 'Android' not in bot:
42 args.append('--randomProcessorTest')
Eric Boren4c7754c2017-04-10 08:19:10 -040043
44 # 32-bit desktop bots tend to run out of memory, because they have relatively
45 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
46 if '-x86-' in bot and not 'NexusPlayer' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040047 args.extend(['--threads', '4'])
Eric Boren4c7754c2017-04-10 08:19:10 -040048
49 # Avoid issues with dynamically exceeding resource cache limits.
50 if 'Test' in bot and 'DISCARDABLE' in bot:
Mike Kleindf669812017-06-23 13:30:17 -040051 args.extend(['--threads', '0'])
52
53 # See if staying on the main thread helps skia:6748.
54 if 'Test-iOS' in bot:
55 args.extend(['--threads', '0'])
Eric Boren4c7754c2017-04-10 08:19:10 -040056
Derek Sollenbergeredfe3df2017-07-19 15:25:24 -040057 # Android's kernel will occasionally attempt to kill our process, using
58 # SIGINT, in an effort to free up resources. If requested, that signal
59 # is ignored and dm will keep attempting to proceed until we actually
60 # exhaust the available resources.
61 if ('NexusPlayer' in bot or
62 'Nexus10' in bot or
63 'PixelC' in bot):
64 args.append('--ignoreSigInt')
65
Eric Boren4c7754c2017-04-10 08:19:10 -040066 # These are the canonical configs that we would ideally run on all bots. We
67 # may opt out or substitute some below for specific bots
68 configs = ['8888', 'srgb', 'pdf']
69 # Add in either gles or gl configs to the canonical set based on OS
70 sample_count = '8'
71 gl_prefix = 'gl'
72 if 'Android' in bot or 'iOS' in bot:
73 sample_count = '4'
74 # We want to test the OpenGL config not the GLES config on the Shield
75 if 'NVIDIA_Shield' not in bot:
76 gl_prefix = 'gles'
77 elif 'Intel' in bot:
78 sample_count = ''
79 elif 'ChromeOS' in bot:
80 gl_prefix = 'gles'
81
82 configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb'])
83 if sample_count is not '':
84 configs.append(gl_prefix + 'msaa' + sample_count)
85
86 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
87 # doesn't support it.
88 if ('NexusPlayer' in bot or
89 'Tegra3' in bot or
Stephan Altmueller93787322017-04-25 14:40:10 -040090 # We aren't interested in fixing msaa bugs on current iOS devices.
Eric Boren4c7754c2017-04-10 08:19:10 -040091 'iPad4' in bot or
Stephan Altmueller93787322017-04-25 14:40:10 -040092 'iPadPro' in bot or
93 'iPhone6' in bot or
94 'iPhone7' in bot or
Eric Boren4c7754c2017-04-10 08:19:10 -040095 # skia:5792
Robert Phillips985e1922017-05-25 07:56:01 -040096 'IntelHD530' in bot or
Eric Boren4c7754c2017-04-10 08:19:10 -040097 'IntelIris540' in bot):
98 configs = [x for x in configs if 'msaa' not in x]
99
100 # The NP produces different images for dft on every run.
101 if 'NexusPlayer' in bot:
102 configs = [x for x in configs if 'dft' not in x]
103
104 # Runs out of memory on Android bots. Everyone else seems fine.
105 if 'Android' in bot:
106 configs.remove('pdf')
107
108 if '-GCE-' in bot:
109 configs.extend(['565'])
110 configs.extend(['f16'])
111 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
112 configs.extend(['lite-8888']) # Experimental display list.
113 configs.extend(['gbr-8888'])
114
115 if '-TSAN' not in bot and sample_count is not '':
Ben Wagnerab909b52017-08-09 14:41:31 -0400116 if ('TegraK1' in bot or
117 'TegraX1' in bot or
118 'GTX550Ti' in bot or
119 'GTX660' in bot or
120 'GT610' in bot or
121 'QuadroP400' in bot):
Eric Boren4c7754c2017-04-10 08:19:10 -0400122 configs.append(gl_prefix + 'nvprdit' + sample_count)
123
124 # We want to test both the OpenGL config and the GLES config on Linux Intel:
125 # GL is used by Chrome, GLES is used by ChromeOS.
Eric Boren89cd3572017-06-28 13:50:22 -0400126 if 'Intel' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400127 configs.extend(['gles', 'glesdft', 'glessrgb'])
128
129 # NP is running out of RAM when we run all these modes. skia:3255
130 if 'NexusPlayer' not in bot:
131 configs.extend(mode + '-8888' for mode in
132 ['serialize', 'tiles_rt', 'pic'])
133
134 # Test instanced rendering on a limited number of platforms
135 if 'Nexus6' in bot:
136 configs.append(gl_prefix + 'inst') # inst msaa isn't working yet on Adreno.
137 elif 'NVIDIA_Shield' in bot or 'PixelC' in bot:
138 # Multisampled instanced configs use nvpr so we substitute inst msaa
139 # configs for nvpr msaa configs.
140 old = gl_prefix + 'nvpr'
141 new = gl_prefix + 'inst'
142 configs = [x.replace(old, new) for x in configs]
143 # We also test non-msaa instanced.
144 configs.append(new)
145 elif 'MacMini6.2' in bot and sample_count is not '':
146 configs.extend([gl_prefix + 'inst', gl_prefix + 'inst' + sample_count])
147
148 # CommandBuffer bot *only* runs the command_buffer config.
149 if 'CommandBuffer' in bot:
150 configs = ['commandbuffer']
151
152 # ANGLE bot *only* runs the angle configs
153 if 'ANGLE' in bot:
154 configs = ['angle_d3d11_es2',
155 'angle_d3d9_es2',
Brian Salomon8c865882017-06-22 09:56:24 -0400156 'angle_gl_es2',
157 'angle_d3d11_es3']
Eric Boren4c7754c2017-04-10 08:19:10 -0400158 if sample_count is not '':
159 configs.append('angle_d3d11_es2_msaa' + sample_count)
Brian Salomon8c865882017-06-22 09:56:24 -0400160 configs.append('angle_d3d11_es3_msaa' + sample_count)
Eric Boren4c7754c2017-04-10 08:19:10 -0400161
162 # Vulkan bot *only* runs the vk config.
163 if 'Vulkan' in bot:
164 configs = ['vk']
165
166 if 'ChromeOS' in bot:
167 # Just run GLES for now - maybe add gles_msaa4 in the future
168 configs = ['gles']
169
Kevin Lubickae95db42017-04-10 13:05:49 -0400170 if 'Ci20' in bot:
171 # This bot is really slow, cut it down to just 8888.
172 configs = ['8888']
173
Mike Klein97627d42017-05-11 13:12:48 -0400174 # This bot only differs from vanilla CPU bots in 8888 config.
175 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
Mike Kleinf6ca16e2017-05-24 14:08:33 -0400176 configs = ['8888', 'srgb']
Mike Klein97627d42017-05-11 13:12:48 -0400177
Chris Dalton97598a52017-07-18 10:49:07 -0600178 # Test coverage counting path renderer.
179 if 'CCPR' in bot:
Chris Dalton80ace822017-07-20 10:54:04 -0600180 configs = [c for c in configs if c == 'gl' or c == 'gles']
Chris Dalton97598a52017-07-18 10:49:07 -0600181 args.extend(['--pr', 'ccpr'])
182
Chris Dalton80ace822017-07-20 10:54:04 -0600183 args.append('--config')
184 args.extend(configs)
185
Eric Boren4c7754c2017-04-10 08:19:10 -0400186 # Run tests, gms, and image decoding tests everywhere.
187 args.extend('--src tests gm image colorImage svg'.split(' '))
188 if 'Vulkan' in bot and 'NexusPlayer' in bot:
189 args.remove('svg')
190 args.remove('image')
191
Mike Klein97627d42017-05-11 13:12:48 -0400192 # Eventually I'd like these to pass, but for now just skip 'em.
193 if 'SK_FORCE_RASTER_PIPELINE_BLITTER' in bot:
194 args.remove('tests')
195
Eric Boren4c7754c2017-04-10 08:19:10 -0400196 blacklisted = []
197 def blacklist(quad):
198 config, src, options, name = quad.split(' ') if type(quad) is str else quad
199 if config == '_' or config in configs:
200 blacklisted.extend([config, src, options, name])
201
202 # TODO: ???
203 blacklist('f16 _ _ dstreadshuffle')
204 blacklist('glsrgb image _ _')
205 blacklist('glessrgb image _ _')
206
Eric Boren4c7754c2017-04-10 08:19:10 -0400207 # Not any point to running these.
208 blacklist('gbr-8888 image _ _')
209 blacklist('gbr-8888 colorImage _ _')
210
211 if 'Valgrind' in bot:
212 # These take 18+ hours to run.
213 blacklist('pdf gm _ fontmgr_iter')
214 blacklist('pdf _ _ PANO_20121023_214540.jpg')
215 blacklist('pdf skp _ worldjournal')
216 blacklist('pdf skp _ desk_baidu.skp')
217 blacklist('pdf skp _ desk_wikipedia.skp')
218 blacklist('_ svg _ _')
219
220 if 'iOS' in bot:
221 blacklist(gl_prefix + ' skp _ _')
222
223 if 'Mac' in bot or 'iOS' in bot:
224 # CG fails on questionable bmps
225 blacklist('_ image gen_platf rgba32abf.bmp')
226 blacklist('_ image gen_platf rgb24prof.bmp')
227 blacklist('_ image gen_platf rgb24lprof.bmp')
228 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
229 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
230 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
231 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
232
233 # CG has unpredictable behavior on this questionable gif
234 # It's probably using uninitialized memory
235 blacklist('_ image gen_platf frame_larger_than_image.gif')
236
237 # CG has unpredictable behavior on incomplete pngs
238 # skbug.com/5774
239 blacklist('_ image gen_platf inc0.png')
240 blacklist('_ image gen_platf inc1.png')
241 blacklist('_ image gen_platf inc2.png')
242 blacklist('_ image gen_platf inc3.png')
243 blacklist('_ image gen_platf inc4.png')
244 blacklist('_ image gen_platf inc5.png')
245 blacklist('_ image gen_platf inc6.png')
246 blacklist('_ image gen_platf inc7.png')
247 blacklist('_ image gen_platf inc8.png')
248 blacklist('_ image gen_platf inc9.png')
249 blacklist('_ image gen_platf inc10.png')
250 blacklist('_ image gen_platf inc11.png')
251 blacklist('_ image gen_platf inc12.png')
252 blacklist('_ image gen_platf inc13.png')
253 blacklist('_ image gen_platf inc14.png')
254
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400255 # WIC fails on questionable bmps
Eric Boren4c7754c2017-04-10 08:19:10 -0400256 if 'Win' in bot:
257 blacklist('_ image gen_platf rle8-height-negative.bmp')
258 blacklist('_ image gen_platf rle4-height-negative.bmp')
259 blacklist('_ image gen_platf pal8os2v2.bmp')
260 blacklist('_ image gen_platf pal8os2v2-16.bmp')
261 blacklist('_ image gen_platf rgba32abf.bmp')
262 blacklist('_ image gen_platf rgb24prof.bmp')
263 blacklist('_ image gen_platf rgb24lprof.bmp')
264 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
265 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
266 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
267 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400268 if 'x86_64' in bot and 'CPU' in bot:
269 # This GM triggers a SkSmallAllocator assert.
270 blacklist('_ gm _ composeshader_bitmap')
271
Matt Sarett6c50a2e2017-05-01 09:13:05 -0400272 # WIC and CG fail on arithmetic jpegs
273 if 'Win' in bot or 'Mac' in bot:
274 blacklist('_ image gen_platf testimgari.jpg')
275
Eric Boren4c7754c2017-04-10 08:19:10 -0400276 if 'Android' in bot or 'iOS' in bot:
277 # This test crashes the N9 (perhaps because of large malloc/frees). It also
278 # is fairly slow and not platform-specific. So we just disable it on all of
279 # Android and iOS. skia:5438
280 blacklist('_ test _ GrShape')
281
Eric Boren4c7754c2017-04-10 08:19:10 -0400282 # skia:4095
Mike Reedfb499092017-06-26 13:53:32 +0000283 bad_serialize_gms = ['bleed_image',
Eric Boren4c7754c2017-04-10 08:19:10 -0400284 'c_gms',
285 'colortype',
286 'colortype_xfermodes',
287 'drawfilter',
288 'fontmgr_bounds_0.75_0',
289 'fontmgr_bounds_1_-0.25',
290 'fontmgr_bounds',
291 'fontmgr_match',
292 'fontmgr_iter',
293 'imagemasksubset']
294
295 # skia:5589
296 bad_serialize_gms.extend(['bitmapfilters',
297 'bitmapshaders',
298 'bleed',
299 'bleed_alpha_bmp',
300 'bleed_alpha_bmp_shader',
301 'convex_poly_clip',
302 'extractalpha',
303 'filterbitmap_checkerboard_32_32_g8',
304 'filterbitmap_image_mandrill_64',
305 'shadows',
306 'simpleaaclip_aaclip'])
307 # skia:5595
308 bad_serialize_gms.extend(['composeshader_bitmap',
309 'scaled_tilemodes_npot',
310 'scaled_tilemodes'])
311
312 # skia:5778
313 bad_serialize_gms.append('typefacerendering_pfaMac')
314 # skia:5942
315 bad_serialize_gms.append('parsedpaths')
316
317 # these use a custom image generator which doesn't serialize
318 bad_serialize_gms.append('ImageGeneratorExternal_rect')
319 bad_serialize_gms.append('ImageGeneratorExternal_shader')
320
321 # skia:6189
322 bad_serialize_gms.append('shadow_utils')
323
Matt Sarett9f3dcb32017-05-04 08:53:32 -0400324 # Not expected to round trip encoding/decoding.
325 bad_serialize_gms.append('makecolorspace')
326
Eric Boren4c7754c2017-04-10 08:19:10 -0400327 for test in bad_serialize_gms:
328 blacklist(['serialize-8888', 'gm', '_', test])
329
330 if 'Mac' not in bot:
331 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
332 blacklist(['serialize-8888', 'gm', '_', test])
333 # It looks like we skip these only for out-of-memory concerns.
334 if 'Win' in bot or 'Android' in bot:
335 for test in ['verylargebitmap', 'verylarge_picture_image']:
336 blacklist(['serialize-8888', 'gm', '_', test])
337
338 # skia:4769
339 for test in ['drawfilter']:
340 blacklist([ 'sp-8888', 'gm', '_', test])
341 blacklist([ 'pic-8888', 'gm', '_', test])
342 blacklist(['2ndpic-8888', 'gm', '_', test])
343 blacklist([ 'lite-8888', 'gm', '_', test])
344 # skia:4703
345 for test in ['image-cacherator-from-picture',
346 'image-cacherator-from-raster',
347 'image-cacherator-from-ctable']:
348 blacklist([ 'sp-8888', 'gm', '_', test])
349 blacklist([ 'pic-8888', 'gm', '_', test])
350 blacklist([ '2ndpic-8888', 'gm', '_', test])
351 blacklist(['serialize-8888', 'gm', '_', test])
352
353 # GM that requires raster-backed canvas
354 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
355 blacklist([ 'sp-8888', 'gm', '_', test])
356 blacklist([ 'pic-8888', 'gm', '_', test])
357 blacklist([ 'lite-8888', 'gm', '_', test])
358 blacklist([ '2ndpic-8888', 'gm', '_', test])
359 blacklist(['serialize-8888', 'gm', '_', test])
360
361 # GM that not support tiles_rt
362 for test in ['complexclip4_bw', 'complexclip4_aa']:
363 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
364
365 # Extensions for RAW images
366 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
367 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
368
369 # skbug.com/4888
370 # Blacklist RAW images (and a few large PNGs) on GPU bots
371 # until we can resolve failures.
Matt Sarett929bfeb2017-05-22 10:34:41 -0400372 if 'GPU' in bot:
373 blacklist('_ image _ interlaced1.png')
374 blacklist('_ image _ interlaced2.png')
375 blacklist('_ image _ interlaced3.png')
376 for raw_ext in r:
377 blacklist('_ image _ .%s' % raw_ext)
378
379 # Blacklist memory intensive tests on 32-bit bots.
380 if ('Win2k8' in bot or 'Win8' in bot) and 'x86-' in bot:
381 blacklist('_ image f16 _')
Matt Sarett112565e2017-05-22 13:45:15 -0400382 blacklist('_ image _ abnormal.wbmp')
Eric Boren4c7754c2017-04-10 08:19:10 -0400383 blacklist('_ image _ interlaced1.png')
384 blacklist('_ image _ interlaced2.png')
385 blacklist('_ image _ interlaced3.png')
386 for raw_ext in r:
387 blacklist('_ image _ .%s' % raw_ext)
388
Eric Boren4c7754c2017-04-10 08:19:10 -0400389 if 'IntelHD405' in bot and 'Ubuntu16' in bot:
390 # skia:6331
391 blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
392 blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp'])
393
394 if 'Nexus5' in bot:
395 # skia:5876
396 blacklist(['_', 'gm', '_', 'encode-platform'])
397
398 if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705
399 blacklist(['_', 'gm', '_', 'bigblurs'])
400 blacklist(['_', 'gm', '_', 'bleed'])
401 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp'])
402 blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader'])
403 blacklist(['_', 'gm', '_', 'bleed_alpha_image'])
404 blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader'])
405 blacklist(['_', 'gm', '_', 'bleed_image'])
406 blacklist(['_', 'gm', '_', 'dropshadowimagefilter'])
407 blacklist(['_', 'gm', '_', 'filterfastbounds'])
408 blacklist([gl_prefix, 'gm', '_', 'imageblurtiled'])
409 blacklist(['_', 'gm', '_', 'imagefiltersclipped'])
410 blacklist(['_', 'gm', '_', 'imagefiltersscaled'])
411 blacklist(['_', 'gm', '_', 'imageresizetiled'])
412 blacklist(['_', 'gm', '_', 'matrixconvolution'])
413 blacklist(['_', 'gm', '_', 'strokedlines'])
414 if sample_count is not '':
415 gl_msaa_config = gl_prefix + 'msaa' + sample_count
416 blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled'])
417 blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase'])
418
419 match = []
420 if 'Valgrind' in bot: # skia:3021
421 match.append('~Threaded')
422
Ben Wagner6c126422017-06-19 12:45:54 -0400423 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
424 # skia:6575
425 match.append('~multipicturedraw_')
426
Ben Wagnerbb3e7ff2017-04-28 15:28:32 -0400427 if 'CommandBuffer' in bot:
428 # https://crbug.com/697030
429 match.append('~HalfFloatAlphaTextureTest')
430
Eric Boren4c7754c2017-04-10 08:19:10 -0400431 if 'AndroidOne' in bot: # skia:4711
432 match.append('~WritePixels')
433
434 if 'NexusPlayer' in bot:
435 match.append('~ResourceCache')
436
437 if 'Nexus10' in bot:
438 match.append('~CopySurface') # skia:5509
439 match.append('~SRGBReadWritePixels') # skia:6097
440
Eric Boren4c7754c2017-04-10 08:19:10 -0400441 if 'GalaxyS6' in bot:
442 match.append('~SpecialImage') # skia:6338
Brian Osmaneee3c092017-06-15 13:25:10 -0400443 match.append('~skbug6653') # skia:6653
Eric Boren4c7754c2017-04-10 08:19:10 -0400444
445 if 'GalaxyS7_G930A' in bot:
446 match.append('~WritePixels') # skia:6427
447
Eric Boren4c7754c2017-04-10 08:19:10 -0400448 if 'MSAN' in bot:
449 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
450
451 if 'TSAN' in bot:
452 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
453 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
454 '~RGB565TextureTest'])
455
Greg Daniela86385d2017-06-05 11:34:29 -0400456 if 'Vulkan' in bot and 'Adreno530' in bot:
457 # skia:5777
458 match.extend(['~CopySurface'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400459
460 if 'Vulkan' in bot and 'NexusPlayer' in bot:
Greg Daniel98fae702017-06-05 09:22:46 -0400461 match.extend(['~gradients_no_texture$', # skia:6132
Eric Boren4c7754c2017-04-10 08:19:10 -0400462 '~tilemodes', # skia:6132
463 '~shadertext$', # skia:6132
464 '~bitmapfilters', # skia:6132
465 '~GrContextFactory_abandon']) #skia:6209
466
Eric Boren89cd3572017-06-28 13:50:22 -0400467 if 'Vulkan' in bot and 'IntelIris540' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400468 match.extend(['~VkHeapTests']) # skia:6245
469
Ben Wagnerf1debdf2017-06-13 13:37:05 -0400470 if 'Vulkan' in bot and 'IntelIris540' in bot and 'Win' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400471 # skia:6398
472 blacklist(['vk', 'gm', '_', 'aarectmodes'])
473 blacklist(['vk', 'gm', '_', 'aaxfermodes'])
474 blacklist(['vk', 'gm', '_', 'arithmode'])
475 blacklist(['vk', 'gm', '_', 'composeshader_bitmap'])
476 blacklist(['vk', 'gm', '_', 'composeshader_bitmap2'])
477 blacklist(['vk', 'gm', '_', 'dftextCOLR'])
478 blacklist(['vk', 'gm', '_', 'drawregionmodes'])
479 blacklist(['vk', 'gm', '_', 'filterfastbounds'])
480 blacklist(['vk', 'gm', '_', 'fontcache'])
481 blacklist(['vk', 'gm', '_', 'fontmgr_iterWin10'])
482 blacklist(['vk', 'gm', '_', 'fontmgr_iter_factoryWin10'])
483 blacklist(['vk', 'gm', '_', 'fontmgr_matchWin10'])
484 blacklist(['vk', 'gm', '_', 'fontscalerWin'])
485 blacklist(['vk', 'gm', '_', 'fontscalerdistortable'])
486 blacklist(['vk', 'gm', '_', 'gammagradienttext'])
487 blacklist(['vk', 'gm', '_', 'gammatextWin'])
488 blacklist(['vk', 'gm', '_', 'gradtext'])
489 blacklist(['vk', 'gm', '_', 'hairmodes'])
490 blacklist(['vk', 'gm', '_', 'imagefilters_xfermodes'])
491 blacklist(['vk', 'gm', '_', 'imagefiltersclipped'])
492 blacklist(['vk', 'gm', '_', 'imagefiltersgraph'])
493 blacklist(['vk', 'gm', '_', 'imagefiltersscaled'])
494 blacklist(['vk', 'gm', '_', 'imagefiltersstroked'])
495 blacklist(['vk', 'gm', '_', 'imagefilterstransformed'])
496 blacklist(['vk', 'gm', '_', 'imageresizetiled'])
497 blacklist(['vk', 'gm', '_', 'lcdblendmodes'])
498 blacklist(['vk', 'gm', '_', 'lcdoverlap'])
499 blacklist(['vk', 'gm', '_', 'lcdtextWin'])
500 blacklist(['vk', 'gm', '_', 'lcdtextsize'])
501 blacklist(['vk', 'gm', '_', 'matriximagefilter'])
502 blacklist(['vk', 'gm', '_', 'mixedtextblobsCOLR'])
Greg Daniel744d3c52017-06-09 13:50:20 -0400503 blacklist(['vk', 'gm', '_', 'mixershader'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400504 blacklist(['vk', 'gm', '_', 'pictureimagefilter'])
505 blacklist(['vk', 'gm', '_', 'resizeimagefilter'])
506 blacklist(['vk', 'gm', '_', 'rotate_imagefilter'])
507 blacklist(['vk', 'gm', '_', 'savelayer_lcdtext'])
508 blacklist(['vk', 'gm', '_', 'srcmode'])
509 blacklist(['vk', 'gm', '_', 'surfaceprops'])
510 blacklist(['vk', 'gm', '_', 'textblobgeometrychange'])
511 blacklist(['vk', 'gm', '_', 'textbloblooper'])
512 blacklist(['vk', 'gm', '_', 'textblobmixedsizes'])
513 blacklist(['vk', 'gm', '_', 'textblobmixedsizes_df'])
514 blacklist(['vk', 'gm', '_', 'textblobrandomfont'])
515 blacklist(['vk', 'gm', '_', 'textfilter_color'])
516 blacklist(['vk', 'gm', '_', 'textfilter_image'])
517 blacklist(['vk', 'gm', '_', 'typefacerenderingWin'])
518 blacklist(['vk', 'gm', '_', 'varied_text_clipped_lcd'])
519 blacklist(['vk', 'gm', '_', 'varied_text_ignorable_clip_lcd'])
520 blacklist(['vk', 'gm', '_', 'xfermodeimagefilter'])
521 match.append('~ApplyGamma')
522 match.append('~ComposedImageFilterBounds_Gpu')
Matt Sarett77443972017-04-11 11:25:37 -0400523 match.append('~DeferredTextureImage')
Chris Dalton114a3c02017-05-26 15:17:19 -0600524 match.append('~GrMeshTest')
Eric Boren4c7754c2017-04-10 08:19:10 -0400525 match.append('~ImageFilterFailAffectsTransparentBlack_Gpu')
526 match.append('~ImageFilterZeroBlurSigma_Gpu')
527 match.append('~ImageNewShader_GPU')
528 match.append('~NewTextureFromPixmap')
529 match.append('~ReadPixels_Gpu')
530 match.append('~ReadPixels_Texture')
531 match.append('~ReadWriteAlpha')
Brian Osmane18ceb12017-06-15 16:04:45 -0400532 match.append('~skbug6653')
Eric Boren4c7754c2017-04-10 08:19:10 -0400533 match.append('~SRGBReadWritePixels')
534 match.append('~SpecialImage_DeferredGpu')
535 match.append('~SpecialImage_Gpu')
536 match.append('~WritePixels_Gpu')
Brian Osman33ea1362017-04-19 10:51:39 -0400537 match.append('~WritePixelsNonTexture_Gpu')
Eric Boren4c7754c2017-04-10 08:19:10 -0400538 match.append('~XfermodeImageFilterCroppedInput_Gpu')
539
540 if 'IntelIris540' in bot and 'ANGLE' in bot:
Eric Boren4c7754c2017-04-10 08:19:10 -0400541 for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']:
Brian Salomon6e554e32017-06-23 12:08:10 -0400542 # skia:6103
Eric Boren4c7754c2017-04-10 08:19:10 -0400543 blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple'])
544 blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple'])
545 blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple'])
546 blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple'])
547 blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple'])
Brian Salomon6e554e32017-06-23 12:08:10 -0400548 # skia:6141
549 blacklist([config, 'gm', '_', 'discard'])
Eric Boren4c7754c2017-04-10 08:19:10 -0400550
Eric Boren89cd3572017-06-28 13:50:22 -0400551 if 'IntelBayTrail' in bot and api.vars.is_linux:
Eric Boren4c7754c2017-04-10 08:19:10 -0400552 match.append('~ImageStorageLoad') # skia:6358
553
Kevin Lubickae95db42017-04-10 13:05:49 -0400554 if 'Ci20' in bot:
555 match.append('~Codec_Dimensions') # skia:6477
556 match.append('~FontMgrAndroidParser') # skia:6478
557 match.append('~PathOpsSimplify') # skia:6479
558 blacklist(['_', 'gm', '_', 'fast_slow_blurimagefilter']) # skia:6480
559
Eric Boren4c7754c2017-04-10 08:19:10 -0400560 if blacklisted:
561 args.append('--blacklist')
562 args.extend(blacklisted)
563
564 if match:
565 args.append('--match')
566 args.extend(match)
567
568 # These bots run out of memory running RAW codec tests. Do not run them in
569 # parallel
570 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
571 or 'Win8-MSVC-ShuttleB' in bot):
572 args.append('--noRAW_threading')
573
Stephan Altmuellere86af692017-07-21 10:12:45 -0400574 # Some people don't like verbose output.
575 verbose = False
576
577 if 'Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot:
578 # TODO(dogben): Track down what's causing bots to die.
579 verbose = True
580
Ben Wagner40c0f242017-04-28 15:55:35 -0400581 if 'Valgrind' in bot and 'PreAbandonGpuContext' in bot:
Ben Wagner47ac0242017-06-27 13:44:36 -0400582 verbose = True
Ben Wagner40c0f242017-04-28 15:55:35 -0400583
Mike Kleinc9089062017-06-26 09:09:32 -0400584 if 'NexusPlayer' in bot and 'CPU' in bot:
585 # The Nexus Player's image decoding tests are slow enough that swarming
586 # times it out for not printing anything frequently enough. --verbose
587 # makes dm print something every time we start or complete a task.
Ben Wagner47ac0242017-06-27 13:44:36 -0400588 verbose = True
589
Stephan Altmuellere86af692017-07-21 10:12:45 -0400590 if 'Android' in bot or 'iOS' in bot:
591 # Enable verbose output on mobile platforms.
592 verbose = True
593
Ben Wagner47ac0242017-06-27 13:44:36 -0400594 if verbose:
Mike Kleinc9089062017-06-26 09:09:32 -0400595 args.append('--verbose')
596
Eric Boren4c7754c2017-04-10 08:19:10 -0400597 return args
598
599
600def key_params(api):
601 """Build a unique key from the builder name (as a list).
602
603 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
604 """
605 # Don't bother to include role, which is always Test.
606 # TryBots are uploaded elsewhere so they can use the same key.
607 blacklist = ['role', 'is_trybot']
608
609 flat = []
610 for k in sorted(api.vars.builder_cfg.keys()):
611 if k not in blacklist:
612 flat.append(k)
613 flat.append(api.vars.builder_cfg[k])
614 return flat
615
616
617def test_steps(api):
618 """Run the DM test."""
619 use_hash_file = False
620 if api.vars.upload_dm_results:
621 # This must run before we write anything into
622 # api.flavor.device_dirs.dm_dir or we may end up deleting our
623 # output on machines where they're the same.
624 api.flavor.create_clean_host_dir(api.vars.dm_dir)
625 host_dm_dir = str(api.vars.dm_dir)
626 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
627 if host_dm_dir != device_dm_dir:
628 api.flavor.create_clean_device_dir(device_dm_dir)
629
630 # Obtain the list of already-generated hashes.
631 hash_filename = 'uninteresting_hashes.txt'
632
633 # Ensure that the tmp_dir exists.
Robert Iannucci8cd50412017-07-07 14:36:58 -0700634 api.run.run_once(api.file.ensure_directory,
635 'makedirs tmp_dir',
636 api.vars.tmp_dir)
Eric Boren4c7754c2017-04-10 08:19:10 -0400637
638 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
639 hashes_file = api.flavor.device_path_join(
640 api.flavor.device_dirs.tmp_dir, hash_filename)
641 api.run(
642 api.python.inline,
643 'get uninteresting hashes',
644 program="""
645 import contextlib
646 import math
647 import socket
648 import sys
649 import time
650 import urllib2
651
Stephan Altmuellerc19ebc52017-05-30 16:39:17 -0400652 HASHES_URL = 'https://storage.googleapis.com/skia-infra-gm/hash_files/gold-prod-hashes.txt'
Eric Boren4c7754c2017-04-10 08:19:10 -0400653 RETRIES = 5
654 TIMEOUT = 60
655 WAIT_BASE = 15
656
657 socket.setdefaulttimeout(TIMEOUT)
658 for retry in range(RETRIES):
659 try:
660 with contextlib.closing(
661 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
662 hashes = w.read()
663 with open(sys.argv[1], 'w') as f:
664 f.write(hashes)
665 break
666 except Exception as e:
667 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
668 print e
669 if retry == RETRIES:
670 raise
671 waittime = WAIT_BASE * math.pow(2, retry)
672 print 'Retry in %d seconds.' % waittime
673 time.sleep(waittime)
674 """,
675 args=[host_hashes_file],
676 abort_on_failure=False,
677 fail_build_on_failure=False,
678 infra_step=True)
679
680 if api.path.exists(host_hashes_file):
681 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
682 use_hash_file = True
683
684 # Run DM.
685 properties = [
686 'gitHash', api.vars.got_revision,
Eric Boren4c7754c2017-04-10 08:19:10 -0400687 'builder', api.vars.builder_name,
Eric Boren4c7754c2017-04-10 08:19:10 -0400688 ]
689 if api.vars.is_trybot:
690 properties.extend([
691 'issue', api.vars.issue,
692 'patchset', api.vars.patchset,
693 'patch_storage', api.vars.patch_storage,
694 ])
Eric Borenf9aa9e52017-04-10 09:56:10 -0400695 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
696 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
Eric Boren4c7754c2017-04-10 08:19:10 -0400697
698 args = [
699 'dm',
Eric Boren4c7754c2017-04-10 08:19:10 -0400700 '--resourcePath', api.flavor.device_dirs.resource_dir,
701 '--skps', api.flavor.device_dirs.skp_dir,
702 '--images', api.flavor.device_path_join(
703 api.flavor.device_dirs.images_dir, 'dm'),
704 '--colorImages', api.flavor.device_path_join(
705 api.flavor.device_dirs.images_dir, 'colorspace'),
706 '--nameByHash',
707 '--properties'
708 ] + properties
709
710 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
711
712 args.append('--key')
713 args.extend(key_params(api))
714 if use_hash_file:
715 args.extend(['--uninterestingHashesFile', hashes_file])
716 if api.vars.upload_dm_results:
717 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
718
719 skip_flag = None
720 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
721 skip_flag = '--nogpu'
722 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
723 skip_flag = '--nocpu'
724 if skip_flag:
725 args.append(skip_flag)
Eric Boren89cd3572017-06-28 13:50:22 -0400726 args.extend(dm_flags(api, api.vars.builder_name))
Eric Boren4c7754c2017-04-10 08:19:10 -0400727
Eric Boren896af752017-04-24 13:22:56 -0400728 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400729 if 'Ubuntu16' in api.vars.builder_name:
730 # The vulkan in this asset name simply means that the graphics driver
731 # supports Vulkan. It is also the driver used for GL code.
732 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release')
733 if 'Debug' in api.vars.builder_name:
734 dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug')
735
736 if 'Vulkan' in api.vars.builder_name:
737 sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin')
738 lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib')
739 env.update({
740 'PATH':'%%(PATH)s:%s' % sdk_path,
741 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path),
742 'LIBGL_DRIVERS_PATH': dri_path,
743 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'),
744 })
745 else:
746 # Even the non-vulkan NUC jobs could benefit from the newer drivers.
747 env.update({
748 'LD_LIBRARY_PATH': dri_path,
749 'LIBGL_DRIVERS_PATH': dri_path,
750 })
751
752 # See skia:2789.
Ben Wagner988d15e2017-04-27 13:08:50 -0400753 extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
754 if 'AbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400755 args.append('--abandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400756 if 'PreAbandonGpuContext' in extra_config_parts:
Eric Boren4c7754c2017-04-10 08:19:10 -0400757 args.append('--preAbandonGpuContext')
Ben Wagner988d15e2017-04-27 13:08:50 -0400758 if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
Eric Boren6ec17e32017-04-26 14:25:29 -0400759 args.append('--releaseAndAbandonGpuContext')
Eric Boren4c7754c2017-04-10 08:19:10 -0400760
Eric Boren896af752017-04-24 13:22:56 -0400761 with api.env(env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400762 api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False)
763
764 if api.vars.upload_dm_results:
765 # Copy images and JSON to host machine if needed.
766 api.flavor.copy_directory_contents_to_host(
767 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
768
769
borenet1ed2ae42016-07-26 11:52:17 -0700770def RunSteps(api):
Eric Boren4c7754c2017-04-10 08:19:10 -0400771 api.core.setup()
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700772 env = {}
Eric Boren4c7754c2017-04-10 08:19:10 -0400773 if 'iOS' in api.vars.builder_name:
774 env['IOS_BUNDLE_ID'] = 'com.google.dm'
Stephan Altmueller63e843d2017-04-25 11:38:38 -0400775 env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice')
Robert Iannucci297a7ef2017-05-12 19:09:38 -0700776 with api.context(env=env):
Eric Boren4c7754c2017-04-10 08:19:10 -0400777 try:
778 api.flavor.install_everything()
779 test_steps(api)
780 finally:
781 api.flavor.cleanup_steps()
782 api.run.check_failure()
783
784
Eric Borenf9aa9e52017-04-10 09:56:10 -0400785TEST_BUILDERS = [
Kevin Lubickfe079d42017-04-12 08:31:48 -0400786 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-Android',
Kevin Lubickae95db42017-04-10 13:05:49 -0400787 'Test-Android-Clang-Ci20-CPU-IngenicJZ4780-mipsel-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400788 'Test-Android-Clang-GalaxyS6-GPU-MaliT760-arm64-Debug-Android',
789 'Test-Android-Clang-GalaxyS7_G930A-GPU-Adreno530-arm64-Debug-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400790 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android',
Chris Dalton80ace822017-07-20 10:54:04 -0600791 "Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_CCPR",
Kevin Lubickfe079d42017-04-12 08:31:48 -0400792 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400793 'Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Release-Android',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400794 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-Android_Vulkan',
Greg Daniela86385d2017-06-05 11:34:29 -0400795 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_Vulkan',
Chris Dalton80ace822017-07-20 10:54:04 -0600796 'Test-Android-Clang-PixelXL-GPU-Adreno530-arm64-Debug-Android_CCPR',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400797 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android',
798 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-Android',
799 'Test-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan',
800 'Test-Android-Clang-PixelC-CPU-TegraX1-arm64-Debug-Android',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400801 'Test-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400802 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
Robert Phillips985e1922017-05-25 07:56:01 -0400803 'Test-Mac-Clang-MacMini6.2-GPU-IntelHD4000-x86_64-Debug-CommandBuffer',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400804 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN',
805 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN',
806 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-TSAN',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400807 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
808 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
Eric Borenf9aa9e52017-04-10 09:56:10 -0400809 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
810 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
811 '_AbandonGpuContext'),
812 ('Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind' +
813 '_PreAbandonGpuContext'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400814 ('Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-SK_USE_DISCARDABLE_' +
815 'SCALEDIMAGECACHE'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400816 'Test-Ubuntu16-Clang-NUC5PPYH-GPU-IntelHD405-x86_64-Debug',
817 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
818 'Test-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release',
819 'Test-Ubuntu16-Clang-NUCDE3815TYKHE-GPU-IntelBayTrail-x86_64-Debug',
Ben Wagnerab909b52017-08-09 14:41:31 -0400820 ('Test-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release-Valgrind' +
821 '_PreAbandonGpuContext_SK_CPU_LIMIT_SSE41'),
Leon Scroggins IIIbb8126d2017-05-02 11:14:31 -0400822 'Test-Win8-MSVC-Golo-CPU-AVX-x86-Debug',
Kevin Lubickfe079d42017-04-12 08:31:48 -0400823 'Test-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-Vulkan',
Eric Boren6ec17e32017-04-26 14:25:29 -0400824 ('Test-Win10-MSVC-NUC5i7RYH-GPU-IntelIris6100-x86_64-Release-'
825 'ReleaseAndAbandonGpuContext'),
Kevin Lubickfe079d42017-04-12 08:31:48 -0400826 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-ANGLE',
827 'Test-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan',
828 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
829 'Test-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Debug-ANGLE',
830 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-x86_64-Debug-Vulkan',
831 'Test-iOS-Clang-iPadMini4-GPU-GX6450-arm-Release',
Mike Klein97627d42017-05-11 13:12:48 -0400832 ('Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-'
833 'SK_FORCE_RASTER_PIPELINE_BLITTER'),
Eric Borenf9aa9e52017-04-10 09:56:10 -0400834]
borenet1ed2ae42016-07-26 11:52:17 -0700835
836
837def GenTests(api):
Eric Borenf9aa9e52017-04-10 09:56:10 -0400838 for builder in TEST_BUILDERS:
839 test = (
840 api.test(builder) +
841 api.properties(buildername=builder,
842 revision='abc123',
843 path_config='kitchen',
844 swarm_out_dir='[SWARM_OUT_DIR]') +
845 api.path.exists(
846 api.path['start_dir'].join('skia'),
847 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
848 'skimage', 'VERSION'),
849 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
850 'skp', 'VERSION'),
851 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
852 'svg', 'VERSION'),
853 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Ben Wagnerf835c222017-04-30 11:14:51 -0400854 ) +
855 api.step_data('get swarming bot id',
856 stdout=api.raw_io.output('skia-bot-123')) +
857 api.step_data('get swarming task id',
858 stdout=api.raw_io.output('123456'))
Eric Borenf9aa9e52017-04-10 09:56:10 -0400859 )
Eric Borenf9aa9e52017-04-10 09:56:10 -0400860 if 'Win' in builder:
861 test += api.platform('win', 64)
Eric Boren4c7754c2017-04-10 08:19:10 -0400862
Eric Borenf9aa9e52017-04-10 09:56:10 -0400863 if 'ChromeOS' in builder:
864 test += api.step_data(
865 'read chromeos ip',
866 stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}'))
Eric Boren4c7754c2017-04-10 08:19:10 -0400867
868
Eric Borenf9aa9e52017-04-10 09:56:10 -0400869 yield test
Eric Boren4c7754c2017-04-10 08:19:10 -0400870
Kevin Lubickfe079d42017-04-12 08:31:48 -0400871 builder = 'Test-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release'
872 yield (
873 api.test('trybot') +
874 api.properties(buildername=builder,
875 revision='abc123',
876 path_config='kitchen',
877 swarm_out_dir='[SWARM_OUT_DIR]') +
878 api.properties(patch_storage='gerrit') +
879 api.properties.tryserver(
880 buildername=builder,
881 gerrit_project='skia',
882 gerrit_url='https://skia-review.googlesource.com/',
883 )+
884 api.path.exists(
885 api.path['start_dir'].join('skia'),
886 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
887 'skimage', 'VERSION'),
888 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
889 'skp', 'VERSION'),
890 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
891 'svg', 'VERSION'),
892 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
893 )
894 )
895
Eric Boren4c7754c2017-04-10 08:19:10 -0400896 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700897 yield (
Eric Boren4c7754c2017-04-10 08:19:10 -0400898 api.test('failed_dm') +
899 api.properties(buildername=builder,
borenet1ed2ae42016-07-26 11:52:17 -0700900 revision='abc123',
901 path_config='kitchen',
902 swarm_out_dir='[SWARM_OUT_DIR]') +
903 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500904 api.path['start_dir'].join('skia'),
905 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400906 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500907 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400908 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500909 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
Eric Boren4c7754c2017-04-10 08:19:10 -0400910 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500911 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
Eric Boren4c7754c2017-04-10 08:19:10 -0400912 ) +
913 api.step_data('symbolized dm', retcode=1)
914 )
915
Kevin Lubickfe079d42017-04-12 08:31:48 -0400916 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400917 yield (
918 api.test('failed_get_hashes') +
919 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400920 revision='abc123',
921 path_config='kitchen',
922 swarm_out_dir='[SWARM_OUT_DIR]') +
923 api.path.exists(
924 api.path['start_dir'].join('skia'),
925 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
926 'skimage', 'VERSION'),
927 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
928 'skp', 'VERSION'),
929 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
930 'svg', 'VERSION'),
931 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
932 ) +
933 api.step_data('get uninteresting hashes', retcode=1)
934 )
935
Kevin Lubickfe079d42017-04-12 08:31:48 -0400936 builder = 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Debug-Android'
Eric Boren4c7754c2017-04-10 08:19:10 -0400937 yield (
938 api.test('failed_push') +
939 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400940 revision='abc123',
941 path_config='kitchen',
942 swarm_out_dir='[SWARM_OUT_DIR]') +
943 api.path.exists(
944 api.path['start_dir'].join('skia'),
945 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
946 'skimage', 'VERSION'),
947 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
948 'skp', 'VERSION'),
949 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
950 'svg', 'VERSION'),
951 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
952 ) +
953 api.step_data('push [START_DIR]/skia/resources/* '+
954 '/sdcard/revenge_of_the_skiabot/resources', retcode=1)
955 )
956
957 builder = 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Debug-Android'
958 yield (
959 api.test('failed_pull') +
960 api.properties(buildername=builder,
Eric Boren4c7754c2017-04-10 08:19:10 -0400961 revision='abc123',
962 path_config='kitchen',
963 swarm_out_dir='[SWARM_OUT_DIR]') +
964 api.path.exists(
965 api.path['start_dir'].join('skia'),
966 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
967 'skimage', 'VERSION'),
968 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
969 'skp', 'VERSION'),
970 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
971 'svg', 'VERSION'),
972 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
973 ) +
974 api.step_data('dm', retcode=1) +
975 api.step_data('pull /sdcard/revenge_of_the_skiabot/dm_out '+
976 '[CUSTOM_[SWARM_OUT_DIR]]/dm', retcode=1)
borenetbfa5b452016-10-19 10:13:32 -0700977 )