blob: 92cac390125ef342befc4f53569721810cebb8e0 [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',
borenet1ed2ae42016-07-26 11:52:17 -070048 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot',
borenet2c3112d2016-08-05 06:30:10 -070049 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE',
mtkleindf5df812016-09-12 12:24:38 -070050 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug',
borenet1ed2ae42016-07-26 11:52:17 -070051 ],
52 },
53}
54
55
borenete2251ac2016-08-05 05:40:59 -070056def dm_flags(bot):
57 args = []
58
59 # 32-bit desktop bots tend to run out of memory, because they have relatively
60 # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
61 if '-x86-' in bot and not 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -070062 args.extend('--threads 4'.split(' '))
borenete2251ac2016-08-05 05:40:59 -070063
64 # These are the canonical configs that we would ideally run on all bots. We
65 # may opt out or substitute some below for specific bots
Matt Sarett5de15c82016-12-15 17:24:17 -050066 configs = ['8888', 'srgb', 'gpu', 'gpudft', 'gpusrgb', 'pdf']
borenete2251ac2016-08-05 05:40:59 -070067 # Add in either msaa4 or msaa16 to the canonical set of configs to run
68 if 'Android' in bot or 'iOS' in bot:
69 configs.append('msaa4')
70 else:
71 configs.append('msaa16')
72
Ben Wagner52245152016-11-02 13:11:05 -040073 # The NP produces a long error stream when we run with MSAA. The Tegra3 just
74 # doesn't support it.
75 if ('NexusPlayer' in bot or
borenete2251ac2016-08-05 05:40:59 -070076 'Tegra3' in bot or
Ben Wagnera2225492016-11-03 09:04:31 -040077 # We aren't interested in fixing msaa bugs on iPad4.
Ben Wagnerc0b4d212017-01-01 10:31:22 -050078 'iPad4' in bot or
benjaminwagnerbc02cae2016-09-23 17:45:45 -070079 # skia:5792
Ben Wagnerc0b4d212017-01-01 10:31:22 -050080 'iHD530' in bot or
81 'IntelIris540' 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'])
Matt Sarett5de15c82016-12-15 17:24:17 -050094 configs.extend(['f16'])
borenete2251ac2016-08-05 05:40:59 -070095 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 _ _')
mtklein09b352f2016-09-15 06:24:03 -0700167 blacklist('gpusrgb image _ _')
mtklein1bf8e6e2016-09-15 11:02:05 -0700168 blacklist('glsrgb image _ _')
borenete2251ac2016-08-05 05:40:59 -0700169
Matt Sarett5de15c82016-12-15 17:24:17 -0500170 # Decoder tests are now performing gamma correct decodes. This means
171 # that, when viewing the results, we need to perform a gamma correct
172 # encode to PNG. Therefore, we run the image tests in srgb mode instead
173 # of 8888.
174 blacklist('8888 image _ _')
175
borenete2251ac2016-08-05 05:40:59 -0700176 if 'Valgrind' in bot:
177 # These take 18+ hours to run.
mtklein09b352f2016-09-15 06:24:03 -0700178 blacklist('pdf gm _ fontmgr_iter')
179 blacklist('pdf _ _ PANO_20121023_214540.jpg')
180 blacklist('pdf skp _ worldjournal')
181 blacklist('pdf skp _ desk_baidu.skp')
182 blacklist('pdf skp _ desk_wikipedia.skp')
fmalita7de57792016-10-03 11:07:36 -0700183 blacklist('_ svg _ _')
borenete2251ac2016-08-05 05:40:59 -0700184
185 if 'iOS' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700186 blacklist('gpu skp _ _')
187 blacklist('msaa skp _ _')
188 blacklist('msaa16 gm _ tilemodesProcess')
borenete2251ac2016-08-05 05:40:59 -0700189
190 if 'Mac' in bot or 'iOS' in bot:
191 # CG fails on questionable bmps
mtklein09b352f2016-09-15 06:24:03 -0700192 blacklist('_ image gen_platf rgba32abf.bmp')
193 blacklist('_ image gen_platf rgb24prof.bmp')
194 blacklist('_ image gen_platf rgb24lprof.bmp')
195 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
196 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
197 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
198 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700199
200 # CG has unpredictable behavior on this questionable gif
201 # It's probably using uninitialized memory
mtklein09b352f2016-09-15 06:24:03 -0700202 blacklist('_ image gen_platf frame_larger_than_image.gif')
borenete2251ac2016-08-05 05:40:59 -0700203
msarett16b15dd2016-09-20 05:50:16 -0700204 # CG has unpredictable behavior on incomplete pngs
205 # skbug.com/5774
206 blacklist('_ image gen_platf inc0.png')
207 blacklist('_ image gen_platf inc1.png')
208 blacklist('_ image gen_platf inc2.png')
209 blacklist('_ image gen_platf inc3.png')
210 blacklist('_ image gen_platf inc4.png')
211 blacklist('_ image gen_platf inc5.png')
212 blacklist('_ image gen_platf inc6.png')
213 blacklist('_ image gen_platf inc7.png')
214 blacklist('_ image gen_platf inc8.png')
215 blacklist('_ image gen_platf inc9.png')
216 blacklist('_ image gen_platf inc10.png')
217 blacklist('_ image gen_platf inc11.png')
218 blacklist('_ image gen_platf inc12.png')
219 blacklist('_ image gen_platf inc13.png')
220 blacklist('_ image gen_platf inc14.png')
221
borenete2251ac2016-08-05 05:40:59 -0700222 # WIC fails on questionable bmps
223 if 'Win' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700224 blacklist('_ image gen_platf rle8-height-negative.bmp')
225 blacklist('_ image gen_platf rle4-height-negative.bmp')
226 blacklist('_ image gen_platf pal8os2v2.bmp')
227 blacklist('_ image gen_platf pal8os2v2-16.bmp')
228 blacklist('_ image gen_platf rgba32abf.bmp')
229 blacklist('_ image gen_platf rgb24prof.bmp')
230 blacklist('_ image gen_platf rgb24lprof.bmp')
231 blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp')
232 blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp')
233 blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp')
234 blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp')
borenete2251ac2016-08-05 05:40:59 -0700235 if 'x86_64' in bot and 'CPU' in bot:
236 # This GM triggers a SkSmallAllocator assert.
mtklein09b352f2016-09-15 06:24:03 -0700237 blacklist('_ gm _ composeshader_bitmap')
borenete2251ac2016-08-05 05:40:59 -0700238
239 if 'Android' in bot or 'iOS' in bot:
240 # This test crashes the N9 (perhaps because of large malloc/frees). It also
241 # is fairly slow and not platform-specific. So we just disable it on all of
242 # Android and iOS. skia:5438
mtklein09b352f2016-09-15 06:24:03 -0700243 blacklist('_ test _ GrShape')
borenete2251ac2016-08-05 05:40:59 -0700244
245 if 'Win8' in bot:
246 # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with
247 # 'Unexpected error' from DirectWrite"
mtklein09b352f2016-09-15 06:24:03 -0700248 blacklist('_ gm _ fontscalerdistortable')
fmalitab5b6de92016-08-16 07:08:48 -0700249 # skia:5636
mtklein09b352f2016-09-15 06:24:03 -0700250 blacklist('_ svg _ Nebraska-StateSeal.svg')
borenete2251ac2016-08-05 05:40:59 -0700251
252 # skia:4095
253 bad_serialize_gms = ['bleed_image',
254 'c_gms',
255 'colortype',
256 'colortype_xfermodes',
257 'drawfilter',
258 'fontmgr_bounds_0.75_0',
259 'fontmgr_bounds_1_-0.25',
260 'fontmgr_bounds',
261 'fontmgr_match',
fmalitace2fc6a2016-08-26 10:13:39 -0700262 'fontmgr_iter',
263 'imagemasksubset']
borenete2251ac2016-08-05 05:40:59 -0700264
265 # skia:5589
266 bad_serialize_gms.extend(['bitmapfilters',
267 'bitmapshaders',
268 'bleed',
269 'bleed_alpha_bmp',
270 'bleed_alpha_bmp_shader',
271 'convex_poly_clip',
272 'extractalpha',
273 'filterbitmap_checkerboard_32_32_g8',
274 'filterbitmap_image_mandrill_64',
275 'shadows',
276 'simpleaaclip_aaclip'])
277 # skia:5595
278 bad_serialize_gms.extend(['composeshader_bitmap',
279 'scaled_tilemodes_npot',
280 'scaled_tilemodes'])
liyuqianbfebe222016-11-14 11:17:16 -0800281
mtklein768dc8f2016-09-20 15:41:29 -0700282 # skia:5778
283 bad_serialize_gms.append('typefacerendering_pfaMac')
liyuqianbfebe222016-11-14 11:17:16 -0800284 # skia:5942
285 bad_serialize_gms.append('parsedpaths')
Florin Malitaca795352016-11-16 14:45:34 -0500286
287 # these use a custom image generator which doesn't serialize
288 bad_serialize_gms.append('ImageGeneratorExternal_rect')
289 bad_serialize_gms.append('ImageGeneratorExternal_shader')
290
borenete2251ac2016-08-05 05:40:59 -0700291 for test in bad_serialize_gms:
mtklein09b352f2016-09-15 06:24:03 -0700292 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700293
294 if 'Mac' not in bot:
295 for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']:
mtklein09b352f2016-09-15 06:24:03 -0700296 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700297 # It looks like we skip these only for out-of-memory concerns.
298 if 'Win' in bot or 'Android' in bot:
299 for test in ['verylargebitmap', 'verylarge_picture_image']:
mtklein09b352f2016-09-15 06:24:03 -0700300 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700301
302 # skia:4769
303 for test in ['drawfilter']:
mtklein09b352f2016-09-15 06:24:03 -0700304 blacklist([ 'sp-8888', 'gm', '_', test])
305 blacklist([ 'pic-8888', 'gm', '_', test])
306 blacklist(['2ndpic-8888', 'gm', '_', test])
307 blacklist([ 'lite-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700308 # skia:4703
309 for test in ['image-cacherator-from-picture',
310 'image-cacherator-from-raster',
311 'image-cacherator-from-ctable']:
mtklein09b352f2016-09-15 06:24:03 -0700312 blacklist([ 'sp-8888', 'gm', '_', test])
313 blacklist([ 'pic-8888', 'gm', '_', test])
314 blacklist([ '2ndpic-8888', 'gm', '_', test])
315 blacklist(['serialize-8888', 'gm', '_', test])
borenete2251ac2016-08-05 05:40:59 -0700316
fmalitaed387722016-09-30 06:14:49 -0700317 # GM that requires raster-backed canvas
Stan Iliev5f1bb0a2016-12-12 17:39:55 -0500318 for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']:
fmalitaed387722016-09-30 06:14:49 -0700319 blacklist([ 'sp-8888', 'gm', '_', test])
320 blacklist([ 'pic-8888', 'gm', '_', test])
321 blacklist([ 'lite-8888', 'gm', '_', test])
322 blacklist([ '2ndpic-8888', 'gm', '_', test])
323 blacklist(['serialize-8888', 'gm', '_', test])
324
Stan Iliev9f8bdbb2016-12-14 17:07:37 -0500325 # GM that not support tiles_rt
326 for test in ['complexclip4_bw', 'complexclip4_aa']:
327 blacklist([ 'tiles_rt-8888', 'gm', '_', test])
328
borenete2251ac2016-08-05 05:40:59 -0700329 # Extensions for RAW images
330 r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
331 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"]
332
333 # skbug.com/4888
334 # Blacklist RAW images (and a few large PNGs) on GPU bots
335 # until we can resolve failures
336 if 'GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700337 blacklist('_ image _ interlaced1.png')
338 blacklist('_ image _ interlaced2.png')
339 blacklist('_ image _ interlaced3.png')
borenete2251ac2016-08-05 05:40:59 -0700340 for raw_ext in r:
mtklein09b352f2016-09-15 06:24:03 -0700341 blacklist('_ image _ .%s' % raw_ext)
borenete2251ac2016-08-05 05:40:59 -0700342
borenete2251ac2016-08-05 05:40:59 -0700343 # Large image that overwhelms older Mac bots
borenet2c3112d2016-08-05 06:30:10 -0700344 if 'MacMini4.1-GPU' in bot:
mtklein09b352f2016-09-15 06:24:03 -0700345 blacklist('_ image _ abnormal.wbmp')
346 blacklist(['msaa16', 'gm', '_', 'blurcircles'])
borenete2251ac2016-08-05 05:40:59 -0700347
348 match = []
349 if 'Valgrind' in bot: # skia:3021
350 match.append('~Threaded')
351
borenete2251ac2016-08-05 05:40:59 -0700352 if 'AndroidOne' in bot: # skia:4711
borenet2c3112d2016-08-05 06:30:10 -0700353 match.append('~WritePixels')
borenete2251ac2016-08-05 05:40:59 -0700354
355 if 'NexusPlayer' in bot:
borenet2c3112d2016-08-05 06:30:10 -0700356 match.append('~ResourceCache')
borenete2251ac2016-08-05 05:40:59 -0700357
358 if 'Nexus10' in bot: # skia:5509
borenet2c3112d2016-08-05 06:30:10 -0700359 match.append('~CopySurface')
borenete2251ac2016-08-05 05:40:59 -0700360
borenet2c3112d2016-08-05 06:30:10 -0700361 if 'ANGLE' in bot and 'Debug' in bot:
borenete2251ac2016-08-05 05:40:59 -0700362 match.append('~GLPrograms') # skia:4717
363
364 if 'MSAN' in bot:
365 match.extend(['~Once', '~Shared']) # Not sure what's up with these tests.
366
borenet2c3112d2016-08-05 06:30:10 -0700367 if 'TSAN' in bot:
borenete2251ac2016-08-05 05:40:59 -0700368 match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots.
Mike Klein4d7bb932016-10-19 12:18:01 -0400369 match.extend(['~RGBA4444TextureTest', # Flakier than they are important.
370 '~RGB565TextureTest'])
borenete2251ac2016-08-05 05:40:59 -0700371
egdaniel15ba6d92016-09-20 12:39:29 -0700372 if 'Vulkan' in bot and 'Adreno' in bot:
373 # skia:5777
374 match.extend(['~XfermodeImageFilterCroppedInput',
375 '~GrTextureStripAtlasFlush',
376 '~CopySurface'])
377
mtklein09b352f2016-09-15 06:24:03 -0700378 if blacklisted:
borenete2251ac2016-08-05 05:40:59 -0700379 args.append('--blacklist')
mtklein09b352f2016-09-15 06:24:03 -0700380 args.extend(blacklisted)
borenete2251ac2016-08-05 05:40:59 -0700381
382 if match:
383 args.append('--match')
384 args.extend(match)
385
386 # These bots run out of memory running RAW codec tests. Do not run them in
387 # parallel
388 if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot
389 or 'Win8-MSVC-ShuttleB' in bot):
390 args.append('--noRAW_threading')
391
392 return args
393
394
borenetbc20a702016-08-03 10:38:44 -0700395def key_params(api):
396 """Build a unique key from the builder name (as a list).
397
398 E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6
399 """
400 # Don't bother to include role, which is always Test.
401 # TryBots are uploaded elsewhere so they can use the same key.
402 blacklist = ['role', 'is_trybot']
403
404 flat = []
405 for k in sorted(api.vars.builder_cfg.keys()):
406 if k not in blacklist:
407 flat.append(k)
408 flat.append(api.vars.builder_cfg[k])
409 return flat
410
411
412def test_steps(api):
413 """Run the DM test."""
414 use_hash_file = False
415 if api.vars.upload_dm_results:
416 # This must run before we write anything into
417 # api.flavor.device_dirs.dm_dir or we may end up deleting our
418 # output on machines where they're the same.
419 api.flavor.create_clean_host_dir(api.vars.dm_dir)
420 host_dm_dir = str(api.vars.dm_dir)
421 device_dm_dir = str(api.flavor.device_dirs.dm_dir)
422 if host_dm_dir != device_dm_dir:
423 api.flavor.create_clean_device_dir(device_dm_dir)
424
425 # Obtain the list of already-generated hashes.
426 hash_filename = 'uninteresting_hashes.txt'
427
428 # Ensure that the tmp_dir exists.
429 api.run.run_once(api.file.makedirs,
430 'tmp_dir',
431 api.vars.tmp_dir,
432 infra_step=True)
433
434 host_hashes_file = api.vars.tmp_dir.join(hash_filename)
435 hashes_file = api.flavor.device_path_join(
436 api.flavor.device_dirs.tmp_dir, hash_filename)
437 api.run(
438 api.python.inline,
439 'get uninteresting hashes',
440 program="""
441 import contextlib
442 import math
443 import socket
444 import sys
445 import time
446 import urllib2
447
448 HASHES_URL = 'https://gold.skia.org/_/hashes'
449 RETRIES = 5
450 TIMEOUT = 60
451 WAIT_BASE = 15
452
453 socket.setdefaulttimeout(TIMEOUT)
454 for retry in range(RETRIES):
455 try:
456 with contextlib.closing(
457 urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w:
458 hashes = w.read()
459 with open(sys.argv[1], 'w') as f:
460 f.write(hashes)
461 break
462 except Exception as e:
463 print 'Failed to get uninteresting hashes from %s:' % HASHES_URL
464 print e
465 if retry == RETRIES:
466 raise
467 waittime = WAIT_BASE * math.pow(2, retry)
468 print 'Retry in %d seconds.' % waittime
469 time.sleep(waittime)
470 """,
471 args=[host_hashes_file],
472 cwd=api.vars.skia_dir,
473 abort_on_failure=False,
474 fail_build_on_failure=False,
475 infra_step=True)
476
477 if api.path.exists(host_hashes_file):
478 api.flavor.copy_file_to_device(host_hashes_file, hashes_file)
479 use_hash_file = True
480
481 # Run DM.
482 properties = [
483 'gitHash', api.vars.got_revision,
484 'master', api.vars.master_name,
485 'builder', api.vars.builder_name,
486 'build_number', api.vars.build_number,
487 ]
488 if api.vars.is_trybot:
489 properties.extend([
rmistry3f1c9c02016-08-24 05:07:06 -0700490 'issue', api.vars.issue,
491 'patchset', api.vars.patchset,
492 'patch_storage', api.vars.patch_storage,
borenetbc20a702016-08-03 10:38:44 -0700493 ])
borenetbfa5b452016-10-19 10:13:32 -0700494 if api.vars.no_buildbot:
495 properties.extend(['no_buildbot', 'True'])
496 properties.extend(['swarming_bot_id', api.vars.swarming_bot_id])
497 properties.extend(['swarming_task_id', api.vars.swarming_task_id])
borenetbc20a702016-08-03 10:38:44 -0700498
499 args = [
500 'dm',
501 '--undefok', # This helps branches that may not know new flags.
502 '--resourcePath', api.flavor.device_dirs.resource_dir,
503 '--skps', api.flavor.device_dirs.skp_dir,
504 '--images', api.flavor.device_path_join(
505 api.flavor.device_dirs.images_dir, 'dm'),
506 '--colorImages', api.flavor.device_path_join(
507 api.flavor.device_dirs.images_dir, 'colorspace'),
508 '--nameByHash',
509 '--properties'
510 ] + properties
511
rmistry70c43ef2016-08-12 07:25:53 -0700512 args.extend(['--svgs', api.flavor.device_dirs.svg_dir])
rmistrybcba19d2016-08-11 12:36:58 -0700513
borenetbc20a702016-08-03 10:38:44 -0700514 args.append('--key')
515 args.extend(key_params(api))
516 if use_hash_file:
517 args.extend(['--uninterestingHashesFile', hashes_file])
518 if api.vars.upload_dm_results:
519 args.extend(['--writePath', api.flavor.device_dirs.dm_dir])
520
521 skip_flag = None
522 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU':
523 skip_flag = '--nogpu'
524 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU':
525 skip_flag = '--nocpu'
526 if skip_flag:
527 args.append(skip_flag)
borenete2251ac2016-08-05 05:40:59 -0700528 args.extend(dm_flags(api.vars.builder_name))
borenetbc20a702016-08-03 10:38:44 -0700529
530 api.run(api.flavor.step, 'dm', cmd=args,
borenetd460a3c2016-08-05 05:18:05 -0700531 abort_on_failure=False,
532 env=api.vars.default_env)
borenetbc20a702016-08-03 10:38:44 -0700533
534 if api.vars.upload_dm_results:
535 # Copy images and JSON to host machine if needed.
536 api.flavor.copy_directory_contents_to_host(
537 api.flavor.device_dirs.dm_dir, api.vars.dm_dir)
538
539 # See skia:2789.
540 if ('Valgrind' in api.vars.builder_name and
541 api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'):
542 abandonGpuContext = list(args)
543 abandonGpuContext.append('--abandonGpuContext')
544 api.run(api.flavor.step, 'dm --abandonGpuContext',
545 cmd=abandonGpuContext, abort_on_failure=False)
546 preAbandonGpuContext = list(args)
547 preAbandonGpuContext.append('--preAbandonGpuContext')
548 api.run(api.flavor.step, 'dm --preAbandonGpuContext',
549 cmd=preAbandonGpuContext, abort_on_failure=False,
550 env=api.vars.default_env)
551
552
borenet1ed2ae42016-07-26 11:52:17 -0700553def RunSteps(api):
borenet1436a092016-08-03 08:23:10 -0700554 api.core.setup()
mtkleindf5df812016-09-12 12:24:38 -0700555 try:
Kevin Lubickb03b5ac2016-11-14 13:42:27 -0500556 api.flavor.install_everything()
mtkleindf5df812016-09-12 12:24:38 -0700557 test_steps(api)
558 finally:
559 api.flavor.cleanup_steps()
borenet1436a092016-08-03 08:23:10 -0700560 api.run.check_failure()
borenet1ed2ae42016-07-26 11:52:17 -0700561
562
563def GenTests(api):
borenet1ed2ae42016-07-26 11:52:17 -0700564 for mastername, slaves in TEST_BUILDERS.iteritems():
565 for slavename, builders_by_slave in slaves.iteritems():
566 for builder in builders_by_slave:
567 test = (
568 api.test(builder) +
569 api.properties(buildername=builder,
570 mastername=mastername,
571 slavename=slavename,
572 buildnumber=5,
573 revision='abc123',
574 path_config='kitchen',
575 swarm_out_dir='[SWARM_OUT_DIR]') +
576 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500577 api.path['start_dir'].join('skia'),
578 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700579 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500580 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700581 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500582 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700583 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500584 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700585 )
586 )
borenet1ed2ae42016-07-26 11:52:17 -0700587 if 'Trybot' in builder:
588 test += api.properties(issue=500,
589 patchset=1,
590 rietveld='https://codereview.chromium.org')
591 if 'Win' in builder:
592 test += api.platform('win', 64)
593
594
595 yield test
596
597 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug'
598 yield (
599 api.test('failed_dm') +
600 api.properties(buildername=builder,
601 mastername='client.skia',
602 slavename='skiabot-linux-swarm-000',
603 buildnumber=6,
604 revision='abc123',
605 path_config='kitchen',
606 swarm_out_dir='[SWARM_OUT_DIR]') +
607 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500608 api.path['start_dir'].join('skia'),
609 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700610 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500611 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700612 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500613 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700614 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500615 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700616 ) +
617 api.step_data('dm', retcode=1)
618 )
619
mtklein122fac32016-09-19 07:26:41 -0700620 builder = 'Test-Android-Clang-Nexus7-GPU-Tegra3-arm-Debug-GN_Android'
borenet1ed2ae42016-07-26 11:52:17 -0700621 yield (
622 api.test('failed_get_hashes') +
623 api.properties(buildername=builder,
624 mastername='client.skia',
625 slavename='skiabot-linux-swarm-000',
626 buildnumber=6,
627 revision='abc123',
628 path_config='kitchen',
629 swarm_out_dir='[SWARM_OUT_DIR]') +
630 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500631 api.path['start_dir'].join('skia'),
632 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700633 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500634 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700635 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500636 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700637 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500638 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700639 ) +
borenet1ed2ae42016-07-26 11:52:17 -0700640 api.step_data('get uninteresting hashes', retcode=1)
641 )
642
mtklein122fac32016-09-19 07:26:41 -0700643 builder = 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug'
borenet1ed2ae42016-07-26 11:52:17 -0700644 yield (
645 api.test('missing_SKP_VERSION_device') +
646 api.properties(buildername=builder,
647 mastername='client.skia',
648 slavename='skiabot-linux-swarm-000',
649 buildnumber=6,
650 revision='abc123',
651 path_config='kitchen',
652 swarm_out_dir='[SWARM_OUT_DIR]') +
653 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500654 api.path['start_dir'].join('skia'),
655 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700656 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500657 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700658 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500659 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700660 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500661 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700662 ) +
mtklein122fac32016-09-19 07:26:41 -0700663 api.step_data('read SKP_VERSION', retcode=1)
borenet1ed2ae42016-07-26 11:52:17 -0700664 )
665
666 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot'
667 yield (
668 api.test('big_issue_number') +
669 api.properties(buildername=builder,
670 mastername='client.skia.compile',
671 slavename='skiabot-linux-swarm-000',
672 buildnumber=5,
673 revision='abc123',
674 path_config='kitchen',
675 swarm_out_dir='[SWARM_OUT_DIR]',
676 rietveld='https://codereview.chromium.org',
677 patchset=1,
678 issue=2147533002L) +
679 api.path.exists(
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500680 api.path['start_dir'].join('skia'),
681 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700682 'skimage', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500683 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
borenet1ed2ae42016-07-26 11:52:17 -0700684 'skp', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500685 api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',
rmistrybcba19d2016-08-11 12:36:58 -0700686 'svg', 'VERSION'),
Ravi Mistry9bcca6a2016-11-21 16:06:19 -0500687 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt')
borenet1ed2ae42016-07-26 11:52:17 -0700688 ) +
689 api.platform('win', 64)
690 )
rmistry3f1c9c02016-08-24 05:07:06 -0700691
692 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot'
rmistry3f1c9c02016-08-24 05:07:06 -0700693 yield (
694 api.test('recipe_with_gerrit_patch') +
695 api.properties(
696 buildername=builder,
697 mastername='client.skia',
698 slavename='skiabot-linux-swarm-000',
699 buildnumber=5,
700 path_config='kitchen',
701 swarm_out_dir='[SWARM_OUT_DIR]',
702 revision='abc123',
borenet96b38422016-10-27 06:35:51 -0700703 patch_storage='gerrit') +
704 api.properties.tryserver(
705 buildername=builder,
706 gerrit_project='skia',
707 gerrit_url='https://skia-review.googlesource.com/',
708 )
rmistry3f1c9c02016-08-24 05:07:06 -0700709 )
borenetbfa5b452016-10-19 10:13:32 -0700710
711 yield (
712 api.test('nobuildbot') +
713 api.properties(
714 buildername=builder,
715 mastername='client.skia',
716 slavename='skiabot-linux-swarm-000',
717 buildnumber=5,
718 path_config='kitchen',
719 swarm_out_dir='[SWARM_OUT_DIR]',
720 revision='abc123',
721 nobuildbot='True',
borenet96b38422016-10-27 06:35:51 -0700722 patch_storage='gerrit') +
723 api.properties.tryserver(
724 buildername=builder,
725 gerrit_project='skia',
726 gerrit_url='https://skia-review.googlesource.com/',
727 ) +
borenetbfa5b452016-10-19 10:13:32 -0700728 api.step_data('get swarming bot id',
729 stdout=api.raw_io.output('skia-bot-123')) +
730 api.step_data('get swarming task id', stdout=api.raw_io.output('123456'))
731 )