blob: a1de3c0b8ee74c1e7b3f899911567ca74127e139 [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 = [
borenetbc20a702016-08-03 10:38:44 -070010 'build/file',
borenet1436a092016-08-03 08:23:10 -070011 'core',
borenet1ed2ae42016-07-26 11:52:17 -070012 'recipe_engine/json',
13 'recipe_engine/path',
14 'recipe_engine/platform',
15 'recipe_engine/properties',
borenetbc20a702016-08-03 10:38:44 -070016 'recipe_engine/python',
borenet1ed2ae42016-07-26 11:52:17 -070017 'recipe_engine/raw_io',
borenetbc20a702016-08-03 10:38:44 -070018 'flavor',
borenet1436a092016-08-03 08:23:10 -070019 'run',
borenetbc20a702016-08-03 10:38:44 -070020 'vars',
borenet1ed2ae42016-07-26 11:52:17 -070021]
22
23
24TEST_BUILDERS = {
25 'client.skia': {
26 'skiabot-linux-swarm-000': [
mtkleindf5df812016-09-12 12:24:38 -070027 'Test-Android-Clang-AndroidOne-CPU-MT6582-arm-Release-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070028 'Test-Android-Clang-AndroidOne-GPU-Mali400MP2-arm-Release-GN_Android',
Ben Wagner52245152016-11-02 13:11:05 -040029 'Test-Android-Clang-GalaxyS7-GPU-Adreno530-arm64-Debug-GN_Android',
mtklein122fac32016-09-19 07:26:41 -070030 'Test-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-GN_Android',
31 'Test-Android-Clang-Nexus10-GPU-MaliT604-arm-Release-GN_Android',
32 'Test-Android-Clang-Nexus6-GPU-Adreno420-arm-Debug-GN_Android',
egdaniel15ba6d92016-09-20 12:39:29 -070033 'Test-Android-Clang-Nexus6p-GPU-Adreno430-arm64-Debug-GN_Android_Vulkan',
mtklein122fac32016-09-19 07:26:41 -070034 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android',
35 'Test-Android-Clang-Nexus9-CPU-Denver-arm64-Debug-GN_Android',
36 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
Ben Wagner25509582016-11-04 11:31:05 -040037 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
borenet2c3112d2016-08-05 06:30:10 -070038 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
39 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
40 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
borenet2c3112d2016-08-05 06:30:10 -070041 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070042 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
mtklein2b3c2a32016-09-08 08:39:34 -070043 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
borenet1ed2ae42016-07-26 11:52:17 -070044 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
rmistrybcba19d2016-08-11 12:36:58 -070045 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
borenet2c3112d2016-08-05 06:30:10 -070046 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
borenet1ed2ae42016-07-26 11:52:17 -070047 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
borenet2c3112d2016-08-05 06:30:10 -070048 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
borenet1ed2ae42016-07-26 11:52:17 -070049 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
borenet2c3112d2016-08-05 06:30:10 -070050 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
mtkleindf5df812016-09-12 12:24:38 -070051 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070052 ],
53 },
54}
55
56
borenete2251ac2016-08-05 05:40:59 -070057def dm_flags(bot):
58 args = []
59
60 # 32-bit desktop bots tend to run out of memory, because they have relatively
61 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
62 if '-x86-' in bot and not 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -070063 args.extend('--threads 4'.split(' '))
borenete2251ac2016-08-05 05:40:59 -070064
65 # These are the canonical configs that we would ideally run on all bots. We
66 # may opt out or substitute some below for specific bots
Ben Wagner52245152016-11-02 13:11:05 -040067 configs = ['8888', 'gpu', 'gpudft', 'gpusrgb', 'pdf']
borenete2251ac2016-08-05 05:40:59 -070068 # Add in either msaa4 or msaa16 to the canonical set of configs to run
69 if 'Android' in bot or 'iOS' in bot:
70 configs.append('msaa4')
71 else:
72 configs.append('msaa16')
73
Ben Wagner52245152016-11-02 13:11:05 -040074 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
75 # doesn't support it.
76 if ('NexusPlayer' in bot or
borenete2251ac2016-08-05 05:40:59 -070077 'Tegra3' in bot or
Ben Wagnera2225492016-11-03 09:04:31 -040078 # We aren't interested in fixing msaa bugs on iPad4.
79 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070080 # skia:5792
81 'iHD530' in bot):
borenete2251ac2016-08-05 05:40:59 -070082 configs = [x for x in configs if 'msaa' not in x]
83
Brian Salomon42cb4902016-11-03 10:08:47 -040084 # The NP produces different images for dft on every run.
85 if 'NexusPlayer' in bot:
86 configs = [x for x in configs if 'gpudft' not in x]
87
Ben Wagner52245152016-11-02 13:11:05 -040088 # Runs out of memory on Android bots. Everyone else seems fine.
89 if 'Android' in bot:
borenete2251ac2016-08-05 05:40:59 -070090 configs.remove('pdf')
91
92 if '-GCE-' in bot:
mtklein896ddb72016-09-14 10:33:12 -070093 configs.extend(['565'])
borenete2251ac2016-08-05 05:40:59 -070094 configs.extend(['f16', 'srgb']) # Gamma-correct formats.
95 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
mtklein03591a72016-08-07 13:35:46 -070096 configs.extend(['lite-8888']) # Experimental display list.
borenete2251ac2016-08-05 05:40:59 -070097
98 if '-TSAN' not in bot:
99 if ('TegraK1' in bot or
100 'TegraX1' in bot or
101 'GTX550Ti' in bot or
102 'GTX660' in bot or
103 'GT610' in bot):
104 if 'Android' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700105 configs.append('nvprdit4')
borenete2251ac2016-08-05 05:40:59 -0700106 else:
107 configs.append('nvprdit16')
108
Ben Wagner25509582016-11-04 11:31:05 -0400109 # We want to test the OpenGL config not the GLES config on the Shield
110 if 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700111 configs = [x.replace('gpu', 'gl') for x in configs]
112 configs = [x.replace('msaa', 'glmsaa') for x in configs]
113 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
114
115 # NP is running out of RAM when we run all these modes. skia:3255
116 if 'NexusPlayer' not in bot:
117 configs.extend(mode + '-8888' for mode in
118 ['serialize', 'tiles_rt', 'pic'])
119
borenete2251ac2016-08-05 05:40:59 -0700120 # Test instanced rendering on a limited number of platforms
borenet2c3112d2016-08-05 06:30:10 -0700121 if 'Nexus6' in bot:
borenete2251ac2016-08-05 05:40:59 -0700122 configs.append('esinst') # esinst4 isn't working yet on Adreno.
Ben Wagner25509582016-11-04 11:31:05 -0400123 elif 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700124 # Multisampled instanced configs use nvpr.
125 configs = [x.replace('glnvpr', 'glinst') for x in configs]
126 configs.append('glinst')
Ben Wagner25509582016-11-04 11:31:05 -0400127 elif 'PixelC' in bot:
128 # Multisampled instanced configs use nvpr.
129 configs = [x.replace('nvpr', 'esinst') for x in configs]
130 configs.append('esinst')
borenete2251ac2016-08-05 05:40:59 -0700131 elif 'MacMini6.2' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700132 configs.extend(['glinst', 'glinst16'])
borenete2251ac2016-08-05 05:40:59 -0700133
134 # CommandBuffer bot *only* runs the command_buffer config.
135 if 'CommandBuffer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700136 configs = ['commandbuffer']
borenete2251ac2016-08-05 05:40:59 -0700137
Brian Salomon02906202016-10-18 13:36:32 -0400138 # ANGLE bot *only* runs the angle configs
139 if 'ANGLE' in bot:
Brian Salomon4a5e49d2016-10-20 10:14:45 -0400140 configs = ['angle_d3d11_es2',
141 'angle_d3d9_es2',
142 'angle_d3d11_es2_msaa4',
143 'angle_gl_es2']
Brian Salomon02906202016-10-18 13:36:32 -0400144
borenete2251ac2016-08-05 05:40:59 -0700145 # Vulkan bot *only* runs the vk config.
146 if 'Vulkan' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700147 configs = ['vk']
borenete2251ac2016-08-05 05:40:59 -0700148
149 args.append('--config')
150 args.extend(configs)
151
152 # Run tests, gms, and image decoding tests everywhere.
rmistry70c43ef2016-08-12 07:25:53 -0700153 args.extend('--src tests gm image colorImage svg'.split(' '))
borenete2251ac2016-08-05 05:40:59 -0700154
155 if 'GalaxyS' in bot:
156 args.extend(('--threads', '0'))
157
mtklein09b352f2016-09-15 06:24:03 -0700158 blacklisted = []
159 def blacklist(quad):
160 config, src, options, name = quad.split(' ') if type(quad) is str else quad
161 if config == '_' or config in configs:
162 blacklisted.extend([config, src, options, name])
borenete2251ac2016-08-05 05:40:59 -0700163
164 # TODO: ???
mtklein09b352f2016-09-15 06:24:03 -0700165 blacklist('f16 _ _ dstreadshuffle')
166 blacklist('f16 image _ _')
167 blacklist('srgb image _ _')
168 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700169 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700170
171 if 'Valgrind' in bot:
172 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700173 blacklist('pdf gm _ fontmgr_iter')
174 blacklist('pdf _ _ PANO_20121023_214540.jpg')
175 blacklist('pdf skp _ worldjournal')
176 blacklist('pdf skp _ desk_baidu.skp')
177 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700178 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700179
180 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700181 blacklist('gpu skp _ _')
182 blacklist('msaa skp _ _')
183 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700184
185 if 'Mac' in bot or 'iOS' in bot:
186 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700187 blacklist('_ image gen_platf rgba32abf.bmp')
188 blacklist('_ image gen_platf rgb24prof.bmp')
189 blacklist('_ image gen_platf rgb24lprof.bmp')
190 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
191 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
192 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
193 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700194
195 # CG has unpredictable behavior on this questionable gif
196 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700197 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700198
msarett16b15dd2016-09-20 05:50:16 -0700199 # CG has unpredictable behavior on incomplete pngs
200 # skbug.com/5774
201 blacklist('_ image gen_platf inc0.png')
202 blacklist('_ image gen_platf inc1.png')
203 blacklist('_ image gen_platf inc2.png')
204 blacklist('_ image gen_platf inc3.png')
205 blacklist('_ image gen_platf inc4.png')
206 blacklist('_ image gen_platf inc5.png')
207 blacklist('_ image gen_platf inc6.png')
208 blacklist('_ image gen_platf inc7.png')
209 blacklist('_ image gen_platf inc8.png')
210 blacklist('_ image gen_platf inc9.png')
211 blacklist('_ image gen_platf inc10.png')
212 blacklist('_ image gen_platf inc11.png')
213 blacklist('_ image gen_platf inc12.png')
214 blacklist('_ image gen_platf inc13.png')
215 blacklist('_ image gen_platf inc14.png')
216
borenete2251ac2016-08-05 05:40:59 -0700217 # WIC fails on questionable bmps
218 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700219 blacklist('_ image gen_platf rle8-height-negative.bmp')
220 blacklist('_ image gen_platf rle4-height-negative.bmp')
221 blacklist('_ image gen_platf pal8os2v2.bmp')
222 blacklist('_ image gen_platf pal8os2v2-16.bmp')
223 blacklist('_ image gen_platf rgba32abf.bmp')
224 blacklist('_ image gen_platf rgb24prof.bmp')
225 blacklist('_ image gen_platf rgb24lprof.bmp')
226 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
227 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
228 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
229 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700230 if 'x86_64' in bot and 'CPU' in bot:
231 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700232 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700233
234 if 'Android' in bot or 'iOS' in bot:
235 # This test crashes the N9 (perhaps because of large malloc/frees). It also
236 # is fairly slow and not platform-specific. So we just disable it on all of
237 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700238 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700239
240 if 'Win8' in bot:
241 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
242 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700243 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700244 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700245 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700246
247 # skia:4095
248 bad_serialize_gms = ['bleed_image',
249 'c_gms',
250 'colortype',
251 'colortype_xfermodes',
252 'drawfilter',
253 'fontmgr_bounds_0.75_0',
254 'fontmgr_bounds_1_-0.25',
255 'fontmgr_bounds',
256 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700257 'fontmgr_iter',
258 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700259
260 # skia:5589
261 bad_serialize_gms.extend(['bitmapfilters',
262 'bitmapshaders',
263 'bleed',
264 'bleed_alpha_bmp',
265 'bleed_alpha_bmp_shader',
266 'convex_poly_clip',
267 'extractalpha',
268 'filterbitmap_checkerboard_32_32_g8',
269 'filterbitmap_image_mandrill_64',
270 'shadows',
271 'simpleaaclip_aaclip'])
272 # skia:5595
273 bad_serialize_gms.extend(['composeshader_bitmap',
274 'scaled_tilemodes_npot',
275 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800276
mtklein768dc8f2016-09-20 15:41:29 -0700277 # skia:5778
278 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800279 # skia:5942
280 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500281
282 # these use a custom image generator which doesn't serialize
283 bad_serialize_gms.append('ImageGeneratorExternal_rect')
284 bad_serialize_gms.append('ImageGeneratorExternal_shader')
285
borenete2251ac2016-08-05 05:40:59 -0700286 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700287 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700288
289 if 'Mac' not in bot:
290 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700291 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700292 # It looks like we skip these only for out-of-memory concerns.
293 if 'Win' in bot or 'Android' in bot:
294 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700295 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700296
297 # skia:4769
298 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700299 blacklist([ 'sp-8888', 'gm', '_', test])
300 blacklist([ 'pic-8888', 'gm', '_', test])
301 blacklist(['2ndpic-8888', 'gm', '_', test])
302 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700303 # skia:4703
304 for test in ['image-cacherator-from-picture',
305 'image-cacherator-from-raster',
306 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700307 blacklist([ 'sp-8888', 'gm', '_', test])
308 blacklist([ 'pic-8888', 'gm', '_', test])
309 blacklist([ '2ndpic-8888', 'gm', '_', test])
310 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700311
fmalitaed387722016-09-30 06:14:49 -0700312 # GM that requires raster-backed canvas
313 for test in ['gamut']:
314 blacklist([ 'sp-8888', 'gm', '_', test])
315 blacklist([ 'pic-8888', 'gm', '_', test])
316 blacklist([ 'lite-8888', 'gm', '_', test])
317 blacklist([ '2ndpic-8888', 'gm', '_', test])
318 blacklist(['serialize-8888', 'gm', '_', test])
319
borenete2251ac2016-08-05 05:40:59 -0700320 # Extensions for RAW images
321 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
322 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
323
324 # skbug.com/4888
325 # Blacklist RAW images (and a few large PNGs) on GPU bots
326 # until we can resolve failures
327 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700328 blacklist('_ image _ interlaced1.png')
329 blacklist('_ image _ interlaced2.png')
330 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700331 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700332 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700333
borenet2c3112d2016-08-05 06:30:10 -0700334 if 'Nexus9' in bot:
borenete2251ac2016-08-05 05:40:59 -0700335 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700336 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700337
338 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700339 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700340 blacklist('_ image _ abnormal.wbmp')
341 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700342
343 match = []
344 if 'Valgrind' in bot: # skia:3021
345 match.append('~Threaded')
346
borenete2251ac2016-08-05 05:40:59 -0700347 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700348 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700349
350 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700351 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700352
353 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700354 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700355
borenet2c3112d2016-08-05 06:30:10 -0700356 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700357 match.append('~GLPrograms') # skia:4717
358
359 if 'MSAN' in bot:
360 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
361
borenet2c3112d2016-08-05 06:30:10 -0700362 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700363 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400364 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
365 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700366
egdaniel15ba6d92016-09-20 12:39:29 -0700367 if 'Vulkan' in bot and 'Adreno' in bot:
368 # skia:5777
369 match.extend(['~XfermodeImageFilterCroppedInput',
370 '~GrTextureStripAtlasFlush',
371 '~CopySurface'])
372
mtklein09b352f2016-09-15 06:24:03 -0700373 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700374 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700375 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700376
377 if match:
378 args.append('--match')
379 args.extend(match)
380
381 # These bots run out of memory running RAW codec tests. Do not run them in
382 # parallel
383 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
384 or 'Win8-MSVC-ShuttleB' in bot):
385 args.append('--noRAW_threading')
386
387 return args
388
389
borenetbc20a702016-08-03 10:38:44 -0700390def key_params(api):
391 """Build a unique key from the builder name (as a list).
392
393 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
394 """
395 # Don't bother to include role, which is always Test.
396 # TryBots are uploaded elsewhere so they can use the same key.
397 blacklist = ['role', 'is_trybot']
398
399 flat = []
400 for k in sorted(api.vars.builder_cfg.keys()):
401 if k not in blacklist:
402 flat.append(k)
403 flat.append(api.vars.builder_cfg[k])
404 return flat
405
406
407def test_steps(api):
408 """Run the DM test."""
409 use_hash_file = False
410 if api.vars.upload_dm_results:
411 # This must run before we write anything into
412 # api.flavor.device_dirs.dm_dir or we may end up deleting our
413 # output on machines where they're the same.
414 api.flavor.create_clean_host_dir(api.vars.dm_dir)
415 host_dm_dir = str(api.vars.dm_dir)
416 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
417 if host_dm_dir != device_dm_dir:
418 api.flavor.create_clean_device_dir(device_dm_dir)
419
420 # Obtain the list of already-generated hashes.
421 hash_filename = 'uninteresting_hashes.txt'
422
423 # Ensure that the tmp_dir exists.
424 api.run.run_once(api.file.makedirs,
425 'tmp_dir',
426 api.vars.tmp_dir,
427 infra_step=True)
428
429 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
430 hashes_file = api.flavor.device_path_join(
431 api.flavor.device_dirs.tmp_dir, hash_filename)
432 api.run(
433 api.python.inline,
434 'get uninteresting hashes',
435 program="""
436 import contextlib
437 import math
438 import socket
439 import sys
440 import time
441 import urllib2
442
443 HASHES_URL = 'https://gold.skia.org/_/hashes'
444 RETRIES = 5
445 TIMEOUT = 60
446 WAIT_BASE = 15
447
448 socket.setdefaulttimeout(TIMEOUT)
449 for retry in range(RETRIES):
450 try:
451 with contextlib.closing(
452 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
453 hashes = w.read()
454 with open(sys.argv[1], 'w') as f:
455 f.write(hashes)
456 break
457 except Exception as e:
458 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
459 print e
460 if retry == RETRIES:
461 raise
462 waittime = WAIT_BASE * math.pow(2, retry)
463 print 'Retry in %d seconds.' % waittime
464 time.sleep(waittime)
465 """,
466 args=[host_hashes_file],
467 cwd=api.vars.skia_dir,
468 abort_on_failure=False,
469 fail_build_on_failure=False,
470 infra_step=True)
471
472 if api.path.exists(host_hashes_file):
473 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
474 use_hash_file = True
475
476 # Run DM.
477 properties = [
478 'gitHash', api.vars.got_revision,
479 'master', api.vars.master_name,
480 'builder', api.vars.builder_name,
481 'build_number', api.vars.build_number,
482 ]
483 if api.vars.is_trybot:
484 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700485 'issue', api.vars.issue,
486 'patchset', api.vars.patchset,
487 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700488 ])
borenetbfa5b452016-10-19 10:13:32 -0700489 if api.vars.no_buildbot:
490 properties.extend(['no_buildbot', 'True'])
491 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
492 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700493
494 args = [
495 'dm',
496 '--undefok', # This helps branches that may not know new flags.
497 '--resourcePath', api.flavor.device_dirs.resource_dir,
498 '--skps', api.flavor.device_dirs.skp_dir,
499 '--images', api.flavor.device_path_join(
500 api.flavor.device_dirs.images_dir, 'dm'),
501 '--colorImages', api.flavor.device_path_join(
502 api.flavor.device_dirs.images_dir, 'colorspace'),
503 '--nameByHash',
504 '--properties'
505 ] + properties
506
rmistry70c43ef2016-08-12 07:25:53 -0700507 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700508
borenetbc20a702016-08-03 10:38:44 -0700509 args.append('--key')
510 args.extend(key_params(api))
511 if use_hash_file:
512 args.extend(['--uninterestingHashesFile', hashes_file])
513 if api.vars.upload_dm_results:
514 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
515
516 skip_flag = None
517 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
518 skip_flag = '--nogpu'
519 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
520 skip_flag = '--nocpu'
521 if skip_flag:
522 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700523 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700524
525 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700526 abort_on_failure=False,
527 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700528
529 if api.vars.upload_dm_results:
530 # Copy images and JSON to host machine if needed.
531 api.flavor.copy_directory_contents_to_host(
532 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
533
534 # See skia:2789.
535 if ('Valgrind' in api.vars.builder_name and
536 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
537 abandonGpuContext = list(args)
538 abandonGpuContext.append('--abandonGpuContext')
539 api.run(api.flavor.step, 'dm --abandonGpuContext',
540 cmd=abandonGpuContext, abort_on_failure=False)
541 preAbandonGpuContext = list(args)
542 preAbandonGpuContext.append('--preAbandonGpuContext')
543 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
544 cmd=preAbandonGpuContext, abort_on_failure=False,
545 env=api.vars.default_env)
546
547
borenet1ed2ae42016-07-26 11:52:17 -0700548def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700549 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700550 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500551 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700552 test_steps(api)
553 finally:
554 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700555 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700556
557
558def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700559 for mastername, slaves in TEST_BUILDERS.iteritems():
560 for slavename, builders_by_slave in slaves.iteritems():
561 for builder in builders_by_slave:
562 test = (
563 api.test(builder) +
564 api.properties(buildername=builder,
565 mastername=mastername,
566 slavename=slavename,
567 buildnumber=5,
568 revision='abc123',
569 path_config='kitchen',
570 swarm_out_dir='[SWARM_OUT_DIR]') +
571 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500572 api.path['start_dir'].join('skia'),
573 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700574 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500575 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700576 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500577 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700578 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500579 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700580 )
581 )
borenet1ed2ae42016-07-26 11:52:17 -0700582 if 'Trybot' in builder:
583 test += api.properties(issue=500,
584 patchset=1,
585 rietveld='https://codereview.chromium.org')
586 if 'Win' in builder:
587 test += api.platform('win', 64)
588
589
590 yield test
591
592 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
593 yield (
594 api.test('failed_dm') +
595 api.properties(buildername=builder,
596 mastername='client.skia',
597 slavename='skiabot-linux-swarm-000',
598 buildnumber=6,
599 revision='abc123',
600 path_config='kitchen',
601 swarm_out_dir='[SWARM_OUT_DIR]') +
602 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500603 api.path['start_dir'].join('skia'),
604 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700605 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500606 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700607 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500608 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700609 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500610 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700611 ) +
612 api.step_data('dm', retcode=1)
613 )
614
mtklein122fac32016-09-19 07:26:41 -0700615 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700616 yield (
617 api.test('failed_get_hashes') +
618 api.properties(buildername=builder,
619 mastername='client.skia',
620 slavename='skiabot-linux-swarm-000',
621 buildnumber=6,
622 revision='abc123',
623 path_config='kitchen',
624 swarm_out_dir='[SWARM_OUT_DIR]') +
625 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500626 api.path['start_dir'].join('skia'),
627 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700628 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500629 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700630 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500631 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700632 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500633 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700634 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700635 api.step_data('get uninteresting hashes', retcode=1)
636 )
637
mtklein122fac32016-09-19 07:26:41 -0700638 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700639 yield (
640 api.test('missing_SKP_VERSION_device') +
641 api.properties(buildername=builder,
642 mastername='client.skia',
643 slavename='skiabot-linux-swarm-000',
644 buildnumber=6,
645 revision='abc123',
646 path_config='kitchen',
647 swarm_out_dir='[SWARM_OUT_DIR]') +
648 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500649 api.path['start_dir'].join('skia'),
650 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700651 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500652 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700653 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500654 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700655 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500656 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700657 ) +
mtklein122fac32016-09-19 07:26:41 -0700658 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700659 )
660
661 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
662 yield (
663 api.test('big_issue_number') +
664 api.properties(buildername=builder,
665 mastername='client.skia.compile',
666 slavename='skiabot-linux-swarm-000',
667 buildnumber=5,
668 revision='abc123',
669 path_config='kitchen',
670 swarm_out_dir='[SWARM_OUT_DIR]',
671 rietveld='https://codereview.chromium.org',
672 patchset=1,
673 issue=2147533002L) +
674 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500675 api.path['start_dir'].join('skia'),
676 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700677 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500678 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700679 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500680 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700681 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500682 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700683 ) +
684 api.platform('win', 64)
685 )
rmistry3f1c9c02016-08-24 05:07:06 -0700686
687 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700688 yield (
689 api.test('recipe_with_gerrit_patch') +
690 api.properties(
691 buildername=builder,
692 mastername='client.skia',
693 slavename='skiabot-linux-swarm-000',
694 buildnumber=5,
695 path_config='kitchen',
696 swarm_out_dir='[SWARM_OUT_DIR]',
697 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700698 patch_storage='gerrit') +
699 api.properties.tryserver(
700 buildername=builder,
701 gerrit_project='skia',
702 gerrit_url='https://skia-review.googlesource.com/',
703 )
rmistry3f1c9c02016-08-24 05:07:06 -0700704 )
borenetbfa5b452016-10-19 10:13:32 -0700705
706 yield (
707 api.test('nobuildbot') +
708 api.properties(
709 buildername=builder,
710 mastername='client.skia',
711 slavename='skiabot-linux-swarm-000',
712 buildnumber=5,
713 path_config='kitchen',
714 swarm_out_dir='[SWARM_OUT_DIR]',
715 revision='abc123',
716 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700717 patch_storage='gerrit') +
718 api.properties.tryserver(
719 buildername=builder,
720 gerrit_project='skia',
721 gerrit_url='https://skia-review.googlesource.com/',
722 ) +
borenetbfa5b452016-10-19 10:13:32 -0700723 api.step_data('get swarming bot id',
724 stdout=api.raw_io.output('skia-bot-123')) +
725 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
726 )