blob: 6f082af542d7bd0bd1ad5439dc4c5609fed12d11 [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',
mtklein122fac32016-09-19 07:26:41 -070035 'Test-Android-Clang-NexusPlayer-CPU-SSE4-x86-Release-GN_Android',
Ben Wagner25509582016-11-04 11:31:05 -040036 'Test-Android-Clang-PixelC-GPU-TegraX1-arm64-Debug-GN_Android',
borenet2c3112d2016-08-05 06:30:10 -070037 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug',
38 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug',
39 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer',
borenet2c3112d2016-08-05 06:30:10 -070040 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070041 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug',
mtklein2b3c2a32016-09-08 08:39:34 -070042 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN',
borenet1ed2ae42016-07-26 11:52:17 -070043 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN',
rmistrybcba19d2016-08-11 12:36:58 -070044 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared',
borenet2c3112d2016-08-05 06:30:10 -070045 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN',
borenet1ed2ae42016-07-26 11:52:17 -070046 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind',
borenet2c3112d2016-08-05 06:30:10 -070047 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan',
Ben Wagnerd4e75e22017-01-04 16:45:26 -050048 'Test-Win10-MSVC-ZBOX-GPU-GTX1070-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
Matt Sarett5de15c82016-12-15 17:24:17 -050067 configs = ['8888', 'srgb', '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.
Ben Wagnerc0b4d212017-01-01 10:31:22 -050079 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070080 # skia:5792
Ben Wagnerc0b4d212017-01-01 10:31:22 -050081 'iHD530' in bot or
82 'IntelIris540' in bot):
borenete2251ac2016-08-05 05:40:59 -070083 configs = [x for x in configs if 'msaa' not in x]
84
Brian Salomon42cb4902016-11-03 10:08:47 -040085 # The NP produces different images for dft on every run.
86 if 'NexusPlayer' in bot:
87 configs = [x for x in configs if 'gpudft' not in x]
88
Ben Wagner52245152016-11-02 13:11:05 -040089 # Runs out of memory on Android bots. Everyone else seems fine.
90 if 'Android' in bot:
borenete2251ac2016-08-05 05:40:59 -070091 configs.remove('pdf')
92
93 if '-GCE-' in bot:
mtklein896ddb72016-09-14 10:33:12 -070094 configs.extend(['565'])
Matt Sarett5de15c82016-12-15 17:24:17 -050095 configs.extend(['f16'])
borenete2251ac2016-08-05 05:40:59 -070096 configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture.
mtklein03591a72016-08-07 13:35:46 -070097 configs.extend(['lite-8888']) # Experimental display list.
borenete2251ac2016-08-05 05:40:59 -070098
99 if '-TSAN' not in bot:
100 if ('TegraK1' in bot or
101 'TegraX1' in bot or
102 'GTX550Ti' in bot or
103 'GTX660' in bot or
104 'GT610' in bot):
105 if 'Android' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700106 configs.append('nvprdit4')
borenete2251ac2016-08-05 05:40:59 -0700107 else:
108 configs.append('nvprdit16')
109
Ben Wagner25509582016-11-04 11:31:05 -0400110 # We want to test the OpenGL config not the GLES config on the Shield
111 if 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700112 configs = [x.replace('gpu', 'gl') for x in configs]
113 configs = [x.replace('msaa', 'glmsaa') for x in configs]
114 configs = [x.replace('nvpr', 'glnvpr') for x in configs]
115
116 # NP is running out of RAM when we run all these modes. skia:3255
117 if 'NexusPlayer' not in bot:
118 configs.extend(mode + '-8888' for mode in
119 ['serialize', 'tiles_rt', 'pic'])
120
borenete2251ac2016-08-05 05:40:59 -0700121 # Test instanced rendering on a limited number of platforms
borenet2c3112d2016-08-05 06:30:10 -0700122 if 'Nexus6' in bot:
borenete2251ac2016-08-05 05:40:59 -0700123 configs.append('esinst') # esinst4 isn't working yet on Adreno.
Ben Wagner25509582016-11-04 11:31:05 -0400124 elif 'NVIDIA_Shield' in bot:
borenete2251ac2016-08-05 05:40:59 -0700125 # Multisampled instanced configs use nvpr.
126 configs = [x.replace('glnvpr', 'glinst') for x in configs]
127 configs.append('glinst')
Ben Wagner25509582016-11-04 11:31:05 -0400128 elif 'PixelC' in bot:
129 # Multisampled instanced configs use nvpr.
130 configs = [x.replace('nvpr', 'esinst') for x in configs]
131 configs.append('esinst')
borenete2251ac2016-08-05 05:40:59 -0700132 elif 'MacMini6.2' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700133 configs.extend(['glinst', 'glinst16'])
borenete2251ac2016-08-05 05:40:59 -0700134
135 # CommandBuffer bot *only* runs the command_buffer config.
136 if 'CommandBuffer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700137 configs = ['commandbuffer']
borenete2251ac2016-08-05 05:40:59 -0700138
Brian Salomon02906202016-10-18 13:36:32 -0400139 # ANGLE bot *only* runs the angle configs
140 if 'ANGLE' in bot:
Brian Salomon4a5e49d2016-10-20 10:14:45 -0400141 configs = ['angle_d3d11_es2',
142 'angle_d3d9_es2',
143 'angle_d3d11_es2_msaa4',
144 'angle_gl_es2']
Brian Salomon02906202016-10-18 13:36:32 -0400145
borenete2251ac2016-08-05 05:40:59 -0700146 # Vulkan bot *only* runs the vk config.
147 if 'Vulkan' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700148 configs = ['vk']
borenete2251ac2016-08-05 05:40:59 -0700149
150 args.append('--config')
151 args.extend(configs)
152
153 # Run tests, gms, and image decoding tests everywhere.
rmistry70c43ef2016-08-12 07:25:53 -0700154 args.extend('--src tests gm image colorImage svg'.split(' '))
borenete2251ac2016-08-05 05:40:59 -0700155
156 if 'GalaxyS' in bot:
157 args.extend(('--threads', '0'))
158
mtklein09b352f2016-09-15 06:24:03 -0700159 blacklisted = []
160 def blacklist(quad):
161 config, src, options, name = quad.split(' ') if type(quad) is str else quad
162 if config == '_' or config in configs:
163 blacklisted.extend([config, src, options, name])
borenete2251ac2016-08-05 05:40:59 -0700164
165 # TODO: ???
mtklein09b352f2016-09-15 06:24:03 -0700166 blacklist('f16 _ _ dstreadshuffle')
167 blacklist('f16 image _ _')
mtklein09b352f2016-09-15 06:24:03 -0700168 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700169 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700170
Matt Sarett5de15c82016-12-15 17:24:17 -0500171 # Decoder tests are now performing gamma correct decodes. This means
172 # that, when viewing the results, we need to perform a gamma correct
173 # encode to PNG. Therefore, we run the image tests in srgb mode instead
174 # of 8888.
175 blacklist('8888 image _ _')
176
borenete2251ac2016-08-05 05:40:59 -0700177 if 'Valgrind' in bot:
178 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700179 blacklist('pdf gm _ fontmgr_iter')
180 blacklist('pdf _ _ PANO_20121023_214540.jpg')
181 blacklist('pdf skp _ worldjournal')
182 blacklist('pdf skp _ desk_baidu.skp')
183 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700184 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700185
186 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700187 blacklist('gpu skp _ _')
188 blacklist('msaa skp _ _')
189 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700190
191 if 'Mac' in bot or 'iOS' in bot:
192 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700193 blacklist('_ image gen_platf rgba32abf.bmp')
194 blacklist('_ image gen_platf rgb24prof.bmp')
195 blacklist('_ image gen_platf rgb24lprof.bmp')
196 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
197 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
198 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
199 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700200
201 # CG has unpredictable behavior on this questionable gif
202 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700203 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700204
msarett16b15dd2016-09-20 05:50:16 -0700205 # CG has unpredictable behavior on incomplete pngs
206 # skbug.com/5774
207 blacklist('_ image gen_platf inc0.png')
208 blacklist('_ image gen_platf inc1.png')
209 blacklist('_ image gen_platf inc2.png')
210 blacklist('_ image gen_platf inc3.png')
211 blacklist('_ image gen_platf inc4.png')
212 blacklist('_ image gen_platf inc5.png')
213 blacklist('_ image gen_platf inc6.png')
214 blacklist('_ image gen_platf inc7.png')
215 blacklist('_ image gen_platf inc8.png')
216 blacklist('_ image gen_platf inc9.png')
217 blacklist('_ image gen_platf inc10.png')
218 blacklist('_ image gen_platf inc11.png')
219 blacklist('_ image gen_platf inc12.png')
220 blacklist('_ image gen_platf inc13.png')
221 blacklist('_ image gen_platf inc14.png')
222
borenete2251ac2016-08-05 05:40:59 -0700223 # WIC fails on questionable bmps
224 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700225 blacklist('_ image gen_platf rle8-height-negative.bmp')
226 blacklist('_ image gen_platf rle4-height-negative.bmp')
227 blacklist('_ image gen_platf pal8os2v2.bmp')
228 blacklist('_ image gen_platf pal8os2v2-16.bmp')
229 blacklist('_ image gen_platf rgba32abf.bmp')
230 blacklist('_ image gen_platf rgb24prof.bmp')
231 blacklist('_ image gen_platf rgb24lprof.bmp')
232 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
233 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
234 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
235 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700236 if 'x86_64' in bot and 'CPU' in bot:
237 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700238 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700239
240 if 'Android' in bot or 'iOS' in bot:
241 # This test crashes the N9 (perhaps because of large malloc/frees). It also
242 # is fairly slow and not platform-specific. So we just disable it on all of
243 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700244 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700245
246 if 'Win8' in bot:
247 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
248 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700249 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700250 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700251 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700252
253 # skia:4095
254 bad_serialize_gms = ['bleed_image',
255 'c_gms',
256 'colortype',
257 'colortype_xfermodes',
258 'drawfilter',
259 'fontmgr_bounds_0.75_0',
260 'fontmgr_bounds_1_-0.25',
261 'fontmgr_bounds',
262 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700263 'fontmgr_iter',
264 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700265
266 # skia:5589
267 bad_serialize_gms.extend(['bitmapfilters',
268 'bitmapshaders',
269 'bleed',
270 'bleed_alpha_bmp',
271 'bleed_alpha_bmp_shader',
272 'convex_poly_clip',
273 'extractalpha',
274 'filterbitmap_checkerboard_32_32_g8',
275 'filterbitmap_image_mandrill_64',
276 'shadows',
277 'simpleaaclip_aaclip'])
278 # skia:5595
279 bad_serialize_gms.extend(['composeshader_bitmap',
280 'scaled_tilemodes_npot',
281 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800282
mtklein768dc8f2016-09-20 15:41:29 -0700283 # skia:5778
284 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800285 # skia:5942
286 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500287
288 # these use a custom image generator which doesn't serialize
289 bad_serialize_gms.append('ImageGeneratorExternal_rect')
290 bad_serialize_gms.append('ImageGeneratorExternal_shader')
291
borenete2251ac2016-08-05 05:40:59 -0700292 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700293 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700294
295 if 'Mac' not in bot:
296 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700297 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700298 # It looks like we skip these only for out-of-memory concerns.
299 if 'Win' in bot or 'Android' in bot:
300 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700301 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700302
303 # skia:4769
304 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700305 blacklist([ 'sp-8888', 'gm', '_', test])
306 blacklist([ 'pic-8888', 'gm', '_', test])
307 blacklist(['2ndpic-8888', 'gm', '_', test])
308 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700309 # skia:4703
310 for test in ['image-cacherator-from-picture',
311 'image-cacherator-from-raster',
312 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700313 blacklist([ 'sp-8888', 'gm', '_', test])
314 blacklist([ 'pic-8888', 'gm', '_', test])
315 blacklist([ '2ndpic-8888', 'gm', '_', test])
316 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700317
fmalitaed387722016-09-30 06:14:49 -0700318 # GM that requires raster-backed canvas
Stan Iliev5f1bb0a2016-12-12 17:39:55 -0500319 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
fmalitaed387722016-09-30 06:14:49 -0700320 blacklist([ 'sp-8888', 'gm', '_', test])
321 blacklist([ 'pic-8888', 'gm', '_', test])
322 blacklist([ 'lite-8888', 'gm', '_', test])
323 blacklist([ '2ndpic-8888', 'gm', '_', test])
324 blacklist(['serialize-8888', 'gm', '_', test])
325
Stan Iliev9f8bdbb2016-12-14 17:07:37 -0500326 # GM that not support tiles_rt
327 for test in ['complexclip4_bw', 'complexclip4_aa']:
328 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
329
borenete2251ac2016-08-05 05:40:59 -0700330 # Extensions for RAW images
331 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
332 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
333
334 # skbug.com/4888
335 # Blacklist RAW images (and a few large PNGs) on GPU bots
336 # until we can resolve failures
337 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700338 blacklist('_ image _ interlaced1.png')
339 blacklist('_ image _ interlaced2.png')
340 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700341 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700342 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700343
borenete2251ac2016-08-05 05:40:59 -0700344 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700345 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700346 blacklist('_ image _ abnormal.wbmp')
347 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700348
349 match = []
350 if 'Valgrind' in bot: # skia:3021
351 match.append('~Threaded')
352
borenete2251ac2016-08-05 05:40:59 -0700353 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700354 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700355
356 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700357 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700358
359 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700360 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700361
borenet2c3112d2016-08-05 06:30:10 -0700362 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700363 match.append('~GLPrograms') # skia:4717
364
365 if 'MSAN' in bot:
366 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
367
borenet2c3112d2016-08-05 06:30:10 -0700368 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700369 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400370 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
371 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700372
egdaniel15ba6d92016-09-20 12:39:29 -0700373 if 'Vulkan' in bot and 'Adreno' in bot:
374 # skia:5777
375 match.extend(['~XfermodeImageFilterCroppedInput',
376 '~GrTextureStripAtlasFlush',
377 '~CopySurface'])
378
Ben Wagnerd4e75e22017-01-04 16:45:26 -0500379 if 'Vulkan' in bot and 'GTX1070' in bot and 'Win' in bot:
380 # skia:6092
381 match.append('~GPUMemorySize')
382
mtklein09b352f2016-09-15 06:24:03 -0700383 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700384 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700385 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700386
387 if match:
388 args.append('--match')
389 args.extend(match)
390
391 # These bots run out of memory running RAW codec tests. Do not run them in
392 # parallel
393 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
394 or 'Win8-MSVC-ShuttleB' in bot):
395 args.append('--noRAW_threading')
396
397 return args
398
399
borenetbc20a702016-08-03 10:38:44 -0700400def key_params(api):
401 """Build a unique key from the builder name (as a list).
402
403 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
404 """
405 # Don't bother to include role, which is always Test.
406 # TryBots are uploaded elsewhere so they can use the same key.
407 blacklist = ['role', 'is_trybot']
408
409 flat = []
410 for k in sorted(api.vars.builder_cfg.keys()):
411 if k not in blacklist:
412 flat.append(k)
413 flat.append(api.vars.builder_cfg[k])
414 return flat
415
416
417def test_steps(api):
418 """Run the DM test."""
419 use_hash_file = False
420 if api.vars.upload_dm_results:
421 # This must run before we write anything into
422 # api.flavor.device_dirs.dm_dir or we may end up deleting our
423 # output on machines where they're the same.
424 api.flavor.create_clean_host_dir(api.vars.dm_dir)
425 host_dm_dir = str(api.vars.dm_dir)
426 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
427 if host_dm_dir != device_dm_dir:
428 api.flavor.create_clean_device_dir(device_dm_dir)
429
430 # Obtain the list of already-generated hashes.
431 hash_filename = 'uninteresting_hashes.txt'
432
433 # Ensure that the tmp_dir exists.
434 api.run.run_once(api.file.makedirs,
435 'tmp_dir',
436 api.vars.tmp_dir,
437 infra_step=True)
438
439 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
440 hashes_file = api.flavor.device_path_join(
441 api.flavor.device_dirs.tmp_dir, hash_filename)
442 api.run(
443 api.python.inline,
444 'get uninteresting hashes',
445 program="""
446 import contextlib
447 import math
448 import socket
449 import sys
450 import time
451 import urllib2
452
453 HASHES_URL = 'https://gold.skia.org/_/hashes'
454 RETRIES = 5
455 TIMEOUT = 60
456 WAIT_BASE = 15
457
458 socket.setdefaulttimeout(TIMEOUT)
459 for retry in range(RETRIES):
460 try:
461 with contextlib.closing(
462 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
463 hashes = w.read()
464 with open(sys.argv[1], 'w') as f:
465 f.write(hashes)
466 break
467 except Exception as e:
468 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
469 print e
470 if retry == RETRIES:
471 raise
472 waittime = WAIT_BASE * math.pow(2, retry)
473 print 'Retry in %d seconds.' % waittime
474 time.sleep(waittime)
475 """,
476 args=[host_hashes_file],
477 cwd=api.vars.skia_dir,
478 abort_on_failure=False,
479 fail_build_on_failure=False,
480 infra_step=True)
481
482 if api.path.exists(host_hashes_file):
483 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
484 use_hash_file = True
485
486 # Run DM.
487 properties = [
488 'gitHash', api.vars.got_revision,
489 'master', api.vars.master_name,
490 'builder', api.vars.builder_name,
491 'build_number', api.vars.build_number,
492 ]
493 if api.vars.is_trybot:
494 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700495 'issue', api.vars.issue,
496 'patchset', api.vars.patchset,
497 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700498 ])
borenetbfa5b452016-10-19 10:13:32 -0700499 if api.vars.no_buildbot:
500 properties.extend(['no_buildbot', 'True'])
501 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
502 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700503
504 args = [
505 'dm',
506 '--undefok', # This helps branches that may not know new flags.
507 '--resourcePath', api.flavor.device_dirs.resource_dir,
508 '--skps', api.flavor.device_dirs.skp_dir,
509 '--images', api.flavor.device_path_join(
510 api.flavor.device_dirs.images_dir, 'dm'),
511 '--colorImages', api.flavor.device_path_join(
512 api.flavor.device_dirs.images_dir, 'colorspace'),
513 '--nameByHash',
514 '--properties'
515 ] + properties
516
rmistry70c43ef2016-08-12 07:25:53 -0700517 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700518
borenetbc20a702016-08-03 10:38:44 -0700519 args.append('--key')
520 args.extend(key_params(api))
521 if use_hash_file:
522 args.extend(['--uninterestingHashesFile', hashes_file])
523 if api.vars.upload_dm_results:
524 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
525
526 skip_flag = None
527 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
528 skip_flag = '--nogpu'
529 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
530 skip_flag = '--nocpu'
531 if skip_flag:
532 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700533 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700534
535 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700536 abort_on_failure=False,
537 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700538
539 if api.vars.upload_dm_results:
540 # Copy images and JSON to host machine if needed.
541 api.flavor.copy_directory_contents_to_host(
542 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
543
544 # See skia:2789.
545 if ('Valgrind' in api.vars.builder_name and
546 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
547 abandonGpuContext = list(args)
548 abandonGpuContext.append('--abandonGpuContext')
549 api.run(api.flavor.step, 'dm --abandonGpuContext',
550 cmd=abandonGpuContext, abort_on_failure=False)
551 preAbandonGpuContext = list(args)
552 preAbandonGpuContext.append('--preAbandonGpuContext')
553 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
554 cmd=preAbandonGpuContext, abort_on_failure=False,
555 env=api.vars.default_env)
556
557
borenet1ed2ae42016-07-26 11:52:17 -0700558def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700559 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700560 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500561 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700562 test_steps(api)
563 finally:
564 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700565 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700566
567
568def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700569 for mastername, slaves in TEST_BUILDERS.iteritems():
570 for slavename, builders_by_slave in slaves.iteritems():
571 for builder in builders_by_slave:
572 test = (
573 api.test(builder) +
574 api.properties(buildername=builder,
575 mastername=mastername,
576 slavename=slavename,
577 buildnumber=5,
578 revision='abc123',
579 path_config='kitchen',
580 swarm_out_dir='[SWARM_OUT_DIR]') +
581 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500582 api.path['start_dir'].join('skia'),
583 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700584 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500585 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700586 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500587 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700588 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500589 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700590 )
591 )
borenet1ed2ae42016-07-26 11:52:17 -0700592 if 'Trybot' in builder:
593 test += api.properties(issue=500,
594 patchset=1,
595 rietveld='https://codereview.chromium.org')
596 if 'Win' in builder:
597 test += api.platform('win', 64)
598
599
600 yield test
601
602 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
603 yield (
604 api.test('failed_dm') +
605 api.properties(buildername=builder,
606 mastername='client.skia',
607 slavename='skiabot-linux-swarm-000',
608 buildnumber=6,
609 revision='abc123',
610 path_config='kitchen',
611 swarm_out_dir='[SWARM_OUT_DIR]') +
612 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500613 api.path['start_dir'].join('skia'),
614 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700615 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500616 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700617 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500618 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700619 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500620 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700621 ) +
622 api.step_data('dm', retcode=1)
623 )
624
mtklein122fac32016-09-19 07:26:41 -0700625 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700626 yield (
627 api.test('failed_get_hashes') +
628 api.properties(buildername=builder,
629 mastername='client.skia',
630 slavename='skiabot-linux-swarm-000',
631 buildnumber=6,
632 revision='abc123',
633 path_config='kitchen',
634 swarm_out_dir='[SWARM_OUT_DIR]') +
635 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500636 api.path['start_dir'].join('skia'),
637 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700638 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500639 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700640 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500641 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700642 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500643 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700644 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700645 api.step_data('get uninteresting hashes', retcode=1)
646 )
647
mtklein122fac32016-09-19 07:26:41 -0700648 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700649 yield (
650 api.test('missing_SKP_VERSION_device') +
651 api.properties(buildername=builder,
652 mastername='client.skia',
653 slavename='skiabot-linux-swarm-000',
654 buildnumber=6,
655 revision='abc123',
656 path_config='kitchen',
657 swarm_out_dir='[SWARM_OUT_DIR]') +
658 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500659 api.path['start_dir'].join('skia'),
660 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700661 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500662 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700663 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500664 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700665 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500666 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700667 ) +
mtklein122fac32016-09-19 07:26:41 -0700668 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700669 )
670
671 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
672 yield (
673 api.test('big_issue_number') +
674 api.properties(buildername=builder,
675 mastername='client.skia.compile',
676 slavename='skiabot-linux-swarm-000',
677 buildnumber=5,
678 revision='abc123',
679 path_config='kitchen',
680 swarm_out_dir='[SWARM_OUT_DIR]',
681 rietveld='https://codereview.chromium.org',
682 patchset=1,
683 issue=2147533002L) +
684 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500685 api.path['start_dir'].join('skia'),
686 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700687 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500688 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700689 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500690 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700691 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500692 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700693 ) +
694 api.platform('win', 64)
695 )
rmistry3f1c9c02016-08-24 05:07:06 -0700696
697 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700698 yield (
699 api.test('recipe_with_gerrit_patch') +
700 api.properties(
701 buildername=builder,
702 mastername='client.skia',
703 slavename='skiabot-linux-swarm-000',
704 buildnumber=5,
705 path_config='kitchen',
706 swarm_out_dir='[SWARM_OUT_DIR]',
707 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700708 patch_storage='gerrit') +
709 api.properties.tryserver(
710 buildername=builder,
711 gerrit_project='skia',
712 gerrit_url='https://skia-review.googlesource.com/',
713 )
rmistry3f1c9c02016-08-24 05:07:06 -0700714 )
borenetbfa5b452016-10-19 10:13:32 -0700715
716 yield (
717 api.test('nobuildbot') +
718 api.properties(
719 buildername=builder,
720 mastername='client.skia',
721 slavename='skiabot-linux-swarm-000',
722 buildnumber=5,
723 path_config='kitchen',
724 swarm_out_dir='[SWARM_OUT_DIR]',
725 revision='abc123',
726 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700727 patch_storage='gerrit') +
728 api.properties.tryserver(
729 buildername=builder,
730 gerrit_project='skia',
731 gerrit_url='https://skia-review.googlesource.com/',
732 ) +
borenetbfa5b452016-10-19 10:13:32 -0700733 api.step_data('get swarming bot id',
734 stdout=api.raw_io.output('skia-bot-123')) +
735 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
736 )