Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 1 | # 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 | |
| 9 | from recipe_engine import recipe_api |
| 10 | |
| 11 | |
| 12 | def dm_flags(bot): |
| 13 | args = [] |
| 14 | |
Brian Osman | c35a2d4 | 2017-03-17 10:58:53 -0400 | [diff] [blame] | 15 | # This enables non-deterministic random seeding of the GPU FP optimization |
Brian Osman | 0dbf042 | 2017-03-20 10:21:26 -0400 | [diff] [blame] | 16 | # test. Limit testing until we're sure it's not going to cause an |
Brian Osman | c35a2d4 | 2017-03-17 10:58:53 -0400 | [diff] [blame] | 17 | # avalanche of problems. |
Brian Osman | ca0913c | 2017-03-22 11:37:23 -0400 | [diff] [blame] | 18 | if 'Ubuntu' in bot or 'Win' in bot or 'Mac' in bot: |
Brian Osman | c35a2d4 | 2017-03-17 10:58:53 -0400 | [diff] [blame] | 19 | args.append('--randomProcessorTest') |
| 20 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 21 | # 32-bit desktop bots tend to run out of memory, because they have relatively |
| 22 | # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. |
| 23 | if '-x86-' in bot and not 'NexusPlayer' in bot: |
| 24 | args.extend('--threads 4'.split(' ')) |
| 25 | |
Matt Sarett | 3adf1c3 | 2017-03-21 13:13:22 -0400 | [diff] [blame] | 26 | # Avoid issues with dynamically exceeding resource cache limits. |
| 27 | if 'Test' in bot and 'DISCARDABLE' in bot: |
| 28 | args.extend('--threads 0'.split(' ')) |
| 29 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 30 | # These are the canonical configs that we would ideally run on all bots. We |
| 31 | # may opt out or substitute some below for specific bots |
Brian Salomon | 50f66d8 | 2017-03-17 14:32:05 -0400 | [diff] [blame] | 32 | configs = ['8888', 'srgb', 'pdf'] |
| 33 | # Add in either gles or gl configs to the canonical set based on OS |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 34 | sample_count = '8' |
| 35 | gl_prefix = 'gl' |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 36 | if 'Android' in bot or 'iOS' in bot: |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 37 | sample_count = '4' |
| 38 | # We want to test the OpenGL config not the GLES config on the Shield |
| 39 | if 'NVIDIA_Shield' not in bot: |
| 40 | gl_prefix = 'gles' |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 41 | elif 'Intel' in bot: |
| 42 | sample_count = '' |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 43 | |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 44 | configs.extend([gl_prefix, gl_prefix + 'dft', gl_prefix + 'srgb']) |
| 45 | if sample_count is not '': |
| 46 | configs.append(gl_prefix + 'msaa' + sample_count) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 47 | |
| 48 | # The NP produces a long error stream when we run with MSAA. The Tegra3 just |
| 49 | # doesn't support it. |
| 50 | if ('NexusPlayer' in bot or |
| 51 | 'Tegra3' in bot or |
| 52 | # We aren't interested in fixing msaa bugs on iPad4. |
| 53 | 'iPad4' in bot or |
| 54 | # skia:5792 |
| 55 | 'iHD530' in bot or |
| 56 | 'IntelIris540' in bot): |
| 57 | configs = [x for x in configs if 'msaa' not in x] |
| 58 | |
| 59 | # The NP produces different images for dft on every run. |
| 60 | if 'NexusPlayer' in bot: |
Brian Salomon | 50f66d8 | 2017-03-17 14:32:05 -0400 | [diff] [blame] | 61 | configs = [x for x in configs if 'dft' not in x] |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 62 | |
| 63 | # Runs out of memory on Android bots. Everyone else seems fine. |
| 64 | if 'Android' in bot: |
| 65 | configs.remove('pdf') |
| 66 | |
| 67 | if '-GCE-' in bot: |
| 68 | configs.extend(['565']) |
| 69 | configs.extend(['f16']) |
| 70 | configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture. |
| 71 | configs.extend(['lite-8888']) # Experimental display list. |
Mike Klein | 919cc45 | 2017-03-18 15:36:52 +0000 | [diff] [blame] | 72 | configs.extend(['gbr-8888']) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 73 | |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 74 | if '-TSAN' not in bot and sample_count is not '': |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 75 | if ('TegraK1' in bot or |
| 76 | 'TegraX1' in bot or |
| 77 | 'GTX550Ti' in bot or |
| 78 | 'GTX660' in bot or |
| 79 | 'GT610' in bot): |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 80 | configs.append(gl_prefix + 'nvprdit' + sample_count) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 81 | |
Ben Wagner | bb91bd3 | 2017-03-20 22:56:19 -0400 | [diff] [blame] | 82 | # We want to test both the OpenGL config and the GLES config on Linux Intel: |
| 83 | # GL is used by Chrome, GLES is used by ChromeOS. |
| 84 | if 'Intel' in bot and 'Ubuntu' in bot: |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 85 | configs.extend(['gles', 'glesdft', 'glessrgb']) |
Ben Wagner | bb91bd3 | 2017-03-20 22:56:19 -0400 | [diff] [blame] | 86 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 87 | # NP is running out of RAM when we run all these modes. skia:3255 |
| 88 | if 'NexusPlayer' not in bot: |
| 89 | configs.extend(mode + '-8888' for mode in |
| 90 | ['serialize', 'tiles_rt', 'pic']) |
| 91 | |
| 92 | # Test instanced rendering on a limited number of platforms |
| 93 | if 'Nexus6' in bot: |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 94 | configs.append(gl_prefix + 'inst') # inst msaa isn't working yet on Adreno. |
| 95 | elif 'NVIDIA_Shield' in bot or 'PixelC' in bot: |
| 96 | # Multisampled instanced configs use nvpr so we substitute inst msaa |
| 97 | # configs for nvpr msaa configs. |
| 98 | old = gl_prefix + 'nvpr' |
| 99 | new = gl_prefix + 'inst' |
| 100 | configs = [x.replace(old, new) for x in configs] |
| 101 | # We also test non-msaa instanced. |
| 102 | configs.append(new) |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 103 | elif 'MacMini6.2' in bot and sample_count is not '': |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 104 | configs.extend([gl_prefix + 'inst', gl_prefix + 'inst' + sample_count]) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 105 | |
| 106 | # CommandBuffer bot *only* runs the command_buffer config. |
| 107 | if 'CommandBuffer' in bot: |
| 108 | configs = ['commandbuffer'] |
| 109 | |
| 110 | # ANGLE bot *only* runs the angle configs |
| 111 | if 'ANGLE' in bot: |
| 112 | configs = ['angle_d3d11_es2', |
| 113 | 'angle_d3d9_es2', |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 114 | 'angle_gl_es2'] |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 115 | if sample_count is not '': |
Brian Salomon | 528ca9b | 2017-03-24 11:15:09 -0400 | [diff] [blame^] | 116 | configs.append('angle_d3d11_es2_msaa' + sample_count) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 117 | |
| 118 | # Vulkan bot *only* runs the vk config. |
| 119 | if 'Vulkan' in bot: |
| 120 | configs = ['vk'] |
| 121 | |
| 122 | args.append('--config') |
| 123 | args.extend(configs) |
| 124 | |
| 125 | # Run tests, gms, and image decoding tests everywhere. |
Greg Daniel | b8e9b52 | 2017-03-09 10:30:31 -0500 | [diff] [blame] | 126 | args.extend('--src tests gm image colorImage svg'.split(' ')) |
| 127 | if 'Vulkan' in bot and 'NexusPlayer' in bot: |
| 128 | args.remove('svg') |
| 129 | args.remove('image') |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 130 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 131 | blacklisted = [] |
| 132 | def blacklist(quad): |
| 133 | config, src, options, name = quad.split(' ') if type(quad) is str else quad |
| 134 | if config == '_' or config in configs: |
| 135 | blacklisted.extend([config, src, options, name]) |
| 136 | |
| 137 | # TODO: ??? |
| 138 | blacklist('f16 _ _ dstreadshuffle') |
Ben Wagner | bb91bd3 | 2017-03-20 22:56:19 -0400 | [diff] [blame] | 139 | blacklist('glsrgb image _ _') |
| 140 | blacklist('glessrgb image _ _') |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 141 | |
| 142 | # Decoder tests are now performing gamma correct decodes. This means |
| 143 | # that, when viewing the results, we need to perform a gamma correct |
| 144 | # encode to PNG. Therefore, we run the image tests in srgb mode instead |
| 145 | # of 8888. |
| 146 | blacklist('8888 image _ _') |
| 147 | |
Mike Klein | 919cc45 | 2017-03-18 15:36:52 +0000 | [diff] [blame] | 148 | # Not any point to running these. |
| 149 | blacklist('gbr-8888 image _ _') |
| 150 | blacklist('gbr-8888 colorImage _ _') |
| 151 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 152 | if 'Valgrind' in bot: |
| 153 | # These take 18+ hours to run. |
| 154 | blacklist('pdf gm _ fontmgr_iter') |
| 155 | blacklist('pdf _ _ PANO_20121023_214540.jpg') |
| 156 | blacklist('pdf skp _ worldjournal') |
| 157 | blacklist('pdf skp _ desk_baidu.skp') |
| 158 | blacklist('pdf skp _ desk_wikipedia.skp') |
| 159 | blacklist('_ svg _ _') |
| 160 | |
| 161 | if 'iOS' in bot: |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 162 | blacklist(gl_prefix + ' skp _ _') |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 163 | |
| 164 | if 'Mac' in bot or 'iOS' in bot: |
| 165 | # CG fails on questionable bmps |
| 166 | blacklist('_ image gen_platf rgba32abf.bmp') |
| 167 | blacklist('_ image gen_platf rgb24prof.bmp') |
| 168 | blacklist('_ image gen_platf rgb24lprof.bmp') |
| 169 | blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp') |
| 170 | blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp') |
| 171 | blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp') |
| 172 | blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp') |
| 173 | |
| 174 | # CG has unpredictable behavior on this questionable gif |
| 175 | # It's probably using uninitialized memory |
| 176 | blacklist('_ image gen_platf frame_larger_than_image.gif') |
| 177 | |
| 178 | # CG has unpredictable behavior on incomplete pngs |
| 179 | # skbug.com/5774 |
| 180 | blacklist('_ image gen_platf inc0.png') |
| 181 | blacklist('_ image gen_platf inc1.png') |
| 182 | blacklist('_ image gen_platf inc2.png') |
| 183 | blacklist('_ image gen_platf inc3.png') |
| 184 | blacklist('_ image gen_platf inc4.png') |
| 185 | blacklist('_ image gen_platf inc5.png') |
| 186 | blacklist('_ image gen_platf inc6.png') |
| 187 | blacklist('_ image gen_platf inc7.png') |
| 188 | blacklist('_ image gen_platf inc8.png') |
| 189 | blacklist('_ image gen_platf inc9.png') |
| 190 | blacklist('_ image gen_platf inc10.png') |
| 191 | blacklist('_ image gen_platf inc11.png') |
| 192 | blacklist('_ image gen_platf inc12.png') |
| 193 | blacklist('_ image gen_platf inc13.png') |
| 194 | blacklist('_ image gen_platf inc14.png') |
| 195 | |
Matt Sarett | fbd6cfb | 2017-02-13 12:04:20 -0500 | [diff] [blame] | 196 | # WIC fails on questionable bmps and arithmetic jpegs |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 197 | if 'Win' in bot: |
| 198 | blacklist('_ image gen_platf rle8-height-negative.bmp') |
| 199 | blacklist('_ image gen_platf rle4-height-negative.bmp') |
| 200 | blacklist('_ image gen_platf pal8os2v2.bmp') |
| 201 | blacklist('_ image gen_platf pal8os2v2-16.bmp') |
| 202 | blacklist('_ image gen_platf rgba32abf.bmp') |
| 203 | blacklist('_ image gen_platf rgb24prof.bmp') |
| 204 | blacklist('_ image gen_platf rgb24lprof.bmp') |
| 205 | blacklist('_ image gen_platf 8bpp-pixeldata-cropped.bmp') |
| 206 | blacklist('_ image gen_platf 4bpp-pixeldata-cropped.bmp') |
| 207 | blacklist('_ image gen_platf 32bpp-pixeldata-cropped.bmp') |
| 208 | blacklist('_ image gen_platf 24bpp-pixeldata-cropped.bmp') |
Matt Sarett | fbd6cfb | 2017-02-13 12:04:20 -0500 | [diff] [blame] | 209 | blacklist('_ image gen_platf testimgari.jpg') |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 210 | if 'x86_64' in bot and 'CPU' in bot: |
| 211 | # This GM triggers a SkSmallAllocator assert. |
| 212 | blacklist('_ gm _ composeshader_bitmap') |
| 213 | |
| 214 | if 'Android' in bot or 'iOS' in bot: |
| 215 | # This test crashes the N9 (perhaps because of large malloc/frees). It also |
| 216 | # is fairly slow and not platform-specific. So we just disable it on all of |
| 217 | # Android and iOS. skia:5438 |
| 218 | blacklist('_ test _ GrShape') |
| 219 | |
| 220 | if 'Win8' in bot: |
| 221 | # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with |
| 222 | # 'Unexpected error' from DirectWrite" |
| 223 | blacklist('_ gm _ fontscalerdistortable') |
| 224 | # skia:5636 |
| 225 | blacklist('_ svg _ Nebraska-StateSeal.svg') |
| 226 | |
| 227 | # skia:4095 |
| 228 | bad_serialize_gms = ['bleed_image', |
| 229 | 'c_gms', |
| 230 | 'colortype', |
| 231 | 'colortype_xfermodes', |
| 232 | 'drawfilter', |
| 233 | 'fontmgr_bounds_0.75_0', |
| 234 | 'fontmgr_bounds_1_-0.25', |
| 235 | 'fontmgr_bounds', |
| 236 | 'fontmgr_match', |
| 237 | 'fontmgr_iter', |
| 238 | 'imagemasksubset'] |
| 239 | |
| 240 | # skia:5589 |
| 241 | bad_serialize_gms.extend(['bitmapfilters', |
| 242 | 'bitmapshaders', |
| 243 | 'bleed', |
| 244 | 'bleed_alpha_bmp', |
| 245 | 'bleed_alpha_bmp_shader', |
| 246 | 'convex_poly_clip', |
| 247 | 'extractalpha', |
| 248 | 'filterbitmap_checkerboard_32_32_g8', |
| 249 | 'filterbitmap_image_mandrill_64', |
| 250 | 'shadows', |
| 251 | 'simpleaaclip_aaclip']) |
| 252 | # skia:5595 |
| 253 | bad_serialize_gms.extend(['composeshader_bitmap', |
| 254 | 'scaled_tilemodes_npot', |
| 255 | 'scaled_tilemodes']) |
| 256 | |
| 257 | # skia:5778 |
| 258 | bad_serialize_gms.append('typefacerendering_pfaMac') |
| 259 | # skia:5942 |
| 260 | bad_serialize_gms.append('parsedpaths') |
| 261 | |
| 262 | # these use a custom image generator which doesn't serialize |
| 263 | bad_serialize_gms.append('ImageGeneratorExternal_rect') |
| 264 | bad_serialize_gms.append('ImageGeneratorExternal_shader') |
| 265 | |
| 266 | # skia:6189 |
| 267 | bad_serialize_gms.append('shadow_utils') |
| 268 | |
| 269 | for test in bad_serialize_gms: |
| 270 | blacklist(['serialize-8888', 'gm', '_', test]) |
| 271 | |
| 272 | if 'Mac' not in bot: |
| 273 | for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']: |
| 274 | blacklist(['serialize-8888', 'gm', '_', test]) |
| 275 | # It looks like we skip these only for out-of-memory concerns. |
| 276 | if 'Win' in bot or 'Android' in bot: |
| 277 | for test in ['verylargebitmap', 'verylarge_picture_image']: |
| 278 | blacklist(['serialize-8888', 'gm', '_', test]) |
| 279 | |
| 280 | # skia:4769 |
| 281 | for test in ['drawfilter']: |
| 282 | blacklist([ 'sp-8888', 'gm', '_', test]) |
| 283 | blacklist([ 'pic-8888', 'gm', '_', test]) |
| 284 | blacklist(['2ndpic-8888', 'gm', '_', test]) |
| 285 | blacklist([ 'lite-8888', 'gm', '_', test]) |
| 286 | # skia:4703 |
| 287 | for test in ['image-cacherator-from-picture', |
| 288 | 'image-cacherator-from-raster', |
| 289 | 'image-cacherator-from-ctable']: |
| 290 | blacklist([ 'sp-8888', 'gm', '_', test]) |
| 291 | blacklist([ 'pic-8888', 'gm', '_', test]) |
| 292 | blacklist([ '2ndpic-8888', 'gm', '_', test]) |
| 293 | blacklist(['serialize-8888', 'gm', '_', test]) |
| 294 | |
| 295 | # GM that requires raster-backed canvas |
| 296 | for test in ['gamut', 'complexclip4_bw', 'complexclip4_aa']: |
| 297 | blacklist([ 'sp-8888', 'gm', '_', test]) |
| 298 | blacklist([ 'pic-8888', 'gm', '_', test]) |
| 299 | blacklist([ 'lite-8888', 'gm', '_', test]) |
| 300 | blacklist([ '2ndpic-8888', 'gm', '_', test]) |
| 301 | blacklist(['serialize-8888', 'gm', '_', test]) |
| 302 | |
| 303 | # GM that not support tiles_rt |
| 304 | for test in ['complexclip4_bw', 'complexclip4_aa']: |
| 305 | blacklist([ 'tiles_rt-8888', 'gm', '_', test]) |
| 306 | |
| 307 | # Extensions for RAW images |
| 308 | r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", |
| 309 | "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"] |
| 310 | |
| 311 | # skbug.com/4888 |
| 312 | # Blacklist RAW images (and a few large PNGs) on GPU bots |
Matt Sarett | 1445475 | 2017-02-02 09:40:54 -0800 | [diff] [blame] | 313 | # until we can resolve failures. |
| 314 | # Also blacklisted on 32-bit Win2k8 for F16 OOM errors. |
| 315 | if 'GPU' in bot or ('Win2k8' in bot and 'x86-' in bot): |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 316 | blacklist('_ image _ interlaced1.png') |
| 317 | blacklist('_ image _ interlaced2.png') |
| 318 | blacklist('_ image _ interlaced3.png') |
| 319 | for raw_ext in r: |
| 320 | blacklist('_ image _ .%s' % raw_ext) |
| 321 | |
| 322 | # Large image that overwhelms older Mac bots |
| 323 | if 'MacMini4.1-GPU' in bot: |
| 324 | blacklist('_ image _ abnormal.wbmp') |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 325 | blacklist([gl_prefix + 'msaa' + sample_count, 'gm', '_', 'blurcircles']) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 326 | |
Ben Wagner | e5f19a8 | 2017-03-06 13:33:03 -0500 | [diff] [blame] | 327 | if 'IntelHD405' in bot and 'Ubuntu16' in bot: |
| 328 | # skia:6331 |
Ben Wagner | bb91bd3 | 2017-03-20 22:56:19 -0400 | [diff] [blame] | 329 | blacklist(['glmsaa8', 'image', 'gen_codec_gpu', 'abnormal.wbmp']) |
| 330 | blacklist(['glesmsaa4', 'image', 'gen_codec_gpu', 'abnormal.wbmp']) |
Ben Wagner | e5f19a8 | 2017-03-06 13:33:03 -0500 | [diff] [blame] | 331 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 332 | if 'Nexus5' in bot: |
| 333 | # skia:5876 |
Ben Wagner | 6a3ae84 | 2017-02-21 18:17:15 -0500 | [diff] [blame] | 334 | blacklist(['_', 'gm', '_', 'encode-platform']) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 335 | |
Ben Wagner | 2f5055f | 2017-02-07 14:25:46 -0500 | [diff] [blame] | 336 | if 'AndroidOne-GPU' in bot: # skia:4697, skia:4704, skia:4694, skia:4705 |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 337 | blacklist(['_', 'gm', '_', 'bigblurs']) |
| 338 | blacklist(['_', 'gm', '_', 'bleed']) |
| 339 | blacklist(['_', 'gm', '_', 'bleed_alpha_bmp']) |
| 340 | blacklist(['_', 'gm', '_', 'bleed_alpha_bmp_shader']) |
| 341 | blacklist(['_', 'gm', '_', 'bleed_alpha_image']) |
| 342 | blacklist(['_', 'gm', '_', 'bleed_alpha_image_shader']) |
| 343 | blacklist(['_', 'gm', '_', 'bleed_image']) |
| 344 | blacklist(['_', 'gm', '_', 'dropshadowimagefilter']) |
| 345 | blacklist(['_', 'gm', '_', 'filterfastbounds']) |
| 346 | blacklist([gl_prefix, 'gm', '_', 'imageblurtiled']) |
Brian Salomon | dcf0ab0 | 2017-03-20 11:10:21 -0400 | [diff] [blame] | 347 | blacklist(['_', 'gm', '_', 'imagefiltersclipped']) |
| 348 | blacklist(['_', 'gm', '_', 'imagefiltersscaled']) |
| 349 | blacklist(['_', 'gm', '_', 'imageresizetiled']) |
| 350 | blacklist(['_', 'gm', '_', 'matrixconvolution']) |
| 351 | blacklist(['_', 'gm', '_', 'strokedlines']) |
Brian Salomon | 4b33ef6 | 2017-03-22 16:51:30 -0400 | [diff] [blame] | 352 | if sample_count is not '': |
| 353 | gl_msaa_config = gl_prefix + 'msaa' + sample_count |
| 354 | blacklist([gl_msaa_config, 'gm', '_', 'imageblurtiled']) |
| 355 | blacklist([gl_msaa_config, 'gm', '_', 'imagefiltersbase']) |
Ben Wagner | 2f5055f | 2017-02-07 14:25:46 -0500 | [diff] [blame] | 356 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 357 | match = [] |
| 358 | if 'Valgrind' in bot: # skia:3021 |
| 359 | match.append('~Threaded') |
| 360 | |
| 361 | if 'AndroidOne' in bot: # skia:4711 |
| 362 | match.append('~WritePixels') |
| 363 | |
| 364 | if 'NexusPlayer' in bot: |
| 365 | match.append('~ResourceCache') |
| 366 | |
| 367 | if 'Nexus10' in bot: |
| 368 | match.append('~CopySurface') # skia:5509 |
| 369 | match.append('~SRGBReadWritePixels') # skia:6097 |
| 370 | |
Ben Wagner | 5fb88b3 | 2017-03-01 14:13:55 -0500 | [diff] [blame] | 371 | if 'GalaxyJ5' in bot: |
| 372 | match.append('~SRGBReadWritePixels') # skia:6097 |
| 373 | |
Ben Wagner | b4dc549 | 2017-03-07 16:41:43 -0500 | [diff] [blame] | 374 | if 'GalaxyS6' in bot: |
| 375 | match.append('~SpecialImage') # skia:6338 |
| 376 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 377 | if 'ANGLE' in bot and 'Debug' in bot: |
| 378 | match.append('~GLPrograms') # skia:4717 |
| 379 | |
| 380 | if 'MSAN' in bot: |
| 381 | match.extend(['~Once', '~Shared']) # Not sure what's up with these tests. |
| 382 | |
| 383 | if 'TSAN' in bot: |
| 384 | match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots. |
| 385 | match.extend(['~RGBA4444TextureTest', # Flakier than they are important. |
| 386 | '~RGB565TextureTest']) |
| 387 | |
| 388 | if 'Vulkan' in bot and 'Adreno' in bot: |
| 389 | # skia:5777 |
| 390 | match.extend(['~XfermodeImageFilterCroppedInput', |
| 391 | '~GrTextureStripAtlasFlush', |
| 392 | '~CopySurface']) |
| 393 | |
| 394 | if 'Vulkan' in bot and 'NexusPlayer' in bot: |
| 395 | match.extend(['~hardstop_gradient', # skia:6037 |
| 396 | '~gradients_dup_color_stops', # skia:6037 |
| 397 | '~gradients_no_texture$', # skia:6132 |
| 398 | '~tilemodes', # skia:6132 |
| 399 | '~shadertext$', # skia:6132 |
Matt Sarett | b73721a | 2017-02-07 14:41:20 -0500 | [diff] [blame] | 400 | '~bitmapfilters', # skia:6132 |
| 401 | '~GrContextFactory_abandon']) #skia:6209 |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 402 | |
| 403 | if 'Vulkan' in bot and 'GTX1070' in bot and 'Win' in bot: |
| 404 | # skia:6092 |
| 405 | match.append('~GPUMemorySize') |
| 406 | |
Greg Daniel | 6579da2 | 2017-02-15 14:41:48 -0500 | [diff] [blame] | 407 | if 'Vulkan' in bot and 'IntelIris540' in bot and 'Ubuntu' in bot: |
Greg Daniel | bff4178 | 2017-02-23 10:11:48 -0500 | [diff] [blame] | 408 | match.extend(['~VkHeapTests', # skia:6245 |
| 409 | '~XfermodeImageFilterCroppedInput_Gpu']) #skia:6280 |
Greg Daniel | 6579da2 | 2017-02-15 14:41:48 -0500 | [diff] [blame] | 410 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 411 | if 'IntelIris540' in bot and 'ANGLE' in bot: |
| 412 | match.append('~IntTexture') # skia:6086 |
Ben Wagner | ae5a871 | 2017-02-07 15:01:41 -0500 | [diff] [blame] | 413 | blacklist(['_', 'gm', '_', 'discard']) # skia:6141 |
| 414 | # skia:6103 |
| 415 | for config in ['angle_d3d9_es2', 'angle_d3d11_es2', 'angle_gl_es2']: |
| 416 | blacklist([config, 'gm', '_', 'multipicturedraw_invpathclip_simple']) |
| 417 | blacklist([config, 'gm', '_', 'multipicturedraw_noclip_simple']) |
| 418 | blacklist([config, 'gm', '_', 'multipicturedraw_pathclip_simple']) |
| 419 | blacklist([config, 'gm', '_', 'multipicturedraw_rectclip_simple']) |
| 420 | blacklist([config, 'gm', '_', 'multipicturedraw_rrectclip_simple']) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 421 | |
Kevin Lubick | 0396434 | 2017-02-21 07:58:16 -0500 | [diff] [blame] | 422 | if 'Vivante' in bot: |
| 423 | # This causes the bot to spin for >3.5 hours. |
| 424 | blacklist(['_', 'gm', '_', 'scaled_tilemodes_npot']) |
| 425 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 426 | if blacklisted: |
| 427 | args.append('--blacklist') |
| 428 | args.extend(blacklisted) |
| 429 | |
| 430 | if match: |
| 431 | args.append('--match') |
| 432 | args.extend(match) |
| 433 | |
| 434 | # These bots run out of memory running RAW codec tests. Do not run them in |
| 435 | # parallel |
| 436 | if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot |
| 437 | or 'Win8-MSVC-ShuttleB' in bot): |
| 438 | args.append('--noRAW_threading') |
| 439 | |
| 440 | return args |
| 441 | |
| 442 | |
| 443 | def key_params(api): |
| 444 | """Build a unique key from the builder name (as a list). |
| 445 | |
| 446 | E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6 |
| 447 | """ |
| 448 | # Don't bother to include role, which is always Test. |
| 449 | # TryBots are uploaded elsewhere so they can use the same key. |
| 450 | blacklist = ['role', 'is_trybot'] |
| 451 | |
| 452 | flat = [] |
| 453 | for k in sorted(api.vars.builder_cfg.keys()): |
| 454 | if k not in blacklist: |
| 455 | flat.append(k) |
| 456 | flat.append(api.vars.builder_cfg[k]) |
| 457 | return flat |
| 458 | |
| 459 | |
| 460 | def test_steps(api): |
| 461 | """Run the DM test.""" |
| 462 | use_hash_file = False |
| 463 | if api.vars.upload_dm_results: |
| 464 | # This must run before we write anything into |
| 465 | # api.flavor.device_dirs.dm_dir or we may end up deleting our |
| 466 | # output on machines where they're the same. |
| 467 | api.flavor.create_clean_host_dir(api.vars.dm_dir) |
| 468 | host_dm_dir = str(api.vars.dm_dir) |
| 469 | device_dm_dir = str(api.flavor.device_dirs.dm_dir) |
| 470 | if host_dm_dir != device_dm_dir: |
| 471 | api.flavor.create_clean_device_dir(device_dm_dir) |
| 472 | |
| 473 | # Obtain the list of already-generated hashes. |
| 474 | hash_filename = 'uninteresting_hashes.txt' |
| 475 | |
| 476 | # Ensure that the tmp_dir exists. |
| 477 | api.run.run_once(api.file.makedirs, |
| 478 | 'tmp_dir', |
| 479 | api.vars.tmp_dir, |
| 480 | infra_step=True) |
| 481 | |
| 482 | host_hashes_file = api.vars.tmp_dir.join(hash_filename) |
| 483 | hashes_file = api.flavor.device_path_join( |
| 484 | api.flavor.device_dirs.tmp_dir, hash_filename) |
| 485 | api.run( |
| 486 | api.python.inline, |
| 487 | 'get uninteresting hashes', |
| 488 | program=""" |
| 489 | import contextlib |
| 490 | import math |
| 491 | import socket |
| 492 | import sys |
| 493 | import time |
| 494 | import urllib2 |
| 495 | |
| 496 | HASHES_URL = 'https://gold.skia.org/_/hashes' |
| 497 | RETRIES = 5 |
| 498 | TIMEOUT = 60 |
| 499 | WAIT_BASE = 15 |
| 500 | |
| 501 | socket.setdefaulttimeout(TIMEOUT) |
| 502 | for retry in range(RETRIES): |
| 503 | try: |
| 504 | with contextlib.closing( |
| 505 | urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w: |
| 506 | hashes = w.read() |
| 507 | with open(sys.argv[1], 'w') as f: |
| 508 | f.write(hashes) |
| 509 | break |
| 510 | except Exception as e: |
| 511 | print 'Failed to get uninteresting hashes from %s:' % HASHES_URL |
| 512 | print e |
| 513 | if retry == RETRIES: |
| 514 | raise |
| 515 | waittime = WAIT_BASE * math.pow(2, retry) |
| 516 | print 'Retry in %d seconds.' % waittime |
| 517 | time.sleep(waittime) |
| 518 | """, |
| 519 | args=[host_hashes_file], |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 520 | abort_on_failure=False, |
| 521 | fail_build_on_failure=False, |
| 522 | infra_step=True) |
| 523 | |
| 524 | if api.path.exists(host_hashes_file): |
| 525 | api.flavor.copy_file_to_device(host_hashes_file, hashes_file) |
| 526 | use_hash_file = True |
| 527 | |
| 528 | # Run DM. |
| 529 | properties = [ |
| 530 | 'gitHash', api.vars.got_revision, |
| 531 | 'master', api.vars.master_name, |
| 532 | 'builder', api.vars.builder_name, |
| 533 | 'build_number', api.vars.build_number, |
| 534 | ] |
| 535 | if api.vars.is_trybot: |
| 536 | properties.extend([ |
| 537 | 'issue', api.vars.issue, |
| 538 | 'patchset', api.vars.patchset, |
| 539 | 'patch_storage', api.vars.patch_storage, |
| 540 | ]) |
| 541 | if api.vars.no_buildbot: |
| 542 | properties.extend(['no_buildbot', 'True']) |
| 543 | properties.extend(['swarming_bot_id', api.vars.swarming_bot_id]) |
| 544 | properties.extend(['swarming_task_id', api.vars.swarming_task_id]) |
| 545 | |
| 546 | args = [ |
| 547 | 'dm', |
| 548 | '--undefok', # This helps branches that may not know new flags. |
| 549 | '--resourcePath', api.flavor.device_dirs.resource_dir, |
| 550 | '--skps', api.flavor.device_dirs.skp_dir, |
| 551 | '--images', api.flavor.device_path_join( |
| 552 | api.flavor.device_dirs.images_dir, 'dm'), |
| 553 | '--colorImages', api.flavor.device_path_join( |
| 554 | api.flavor.device_dirs.images_dir, 'colorspace'), |
| 555 | '--nameByHash', |
| 556 | '--properties' |
| 557 | ] + properties |
| 558 | |
| 559 | args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) |
| 560 | |
| 561 | args.append('--key') |
| 562 | args.extend(key_params(api)) |
| 563 | if use_hash_file: |
| 564 | args.extend(['--uninterestingHashesFile', hashes_file]) |
| 565 | if api.vars.upload_dm_results: |
| 566 | args.extend(['--writePath', api.flavor.device_dirs.dm_dir]) |
| 567 | |
| 568 | skip_flag = None |
| 569 | if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
| 570 | skip_flag = '--nogpu' |
| 571 | elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
| 572 | skip_flag = '--nocpu' |
| 573 | if skip_flag: |
| 574 | args.append(skip_flag) |
| 575 | args.extend(dm_flags(api.vars.builder_name)) |
| 576 | |
Eric Boren | bbb24f2 | 2017-03-21 08:20:33 -0400 | [diff] [blame] | 577 | env = api.step.get_from_context('env', {}) |
Kevin Lubick | 35115eb | 2017-02-17 10:25:34 -0500 | [diff] [blame] | 578 | if 'Ubuntu16' in api.vars.builder_name: |
| 579 | # The vulkan in this asset name simply means that the graphics driver |
| 580 | # supports Vulkan. It is also the driver used for GL code. |
Kevin Lubick | 0a51b48 | 2017-02-06 12:45:29 -0500 | [diff] [blame] | 581 | dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_release') |
| 582 | if 'Debug' in api.vars.builder_name: |
| 583 | dri_path = api.vars.slave_dir.join('linux_vulkan_intel_driver_debug') |
| 584 | |
Kevin Lubick | 35115eb | 2017-02-17 10:25:34 -0500 | [diff] [blame] | 585 | if 'Vulkan' in api.vars.builder_name: |
| 586 | sdk_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'bin') |
| 587 | lib_path = api.vars.slave_dir.join('linux_vulkan_sdk', 'lib') |
| 588 | env.update({ |
| 589 | 'PATH':'%%(PATH)s:%s' % sdk_path, |
| 590 | 'LD_LIBRARY_PATH': '%s:%s' % (lib_path, dri_path), |
| 591 | 'LIBGL_DRIVERS_PATH': dri_path, |
| 592 | 'VK_ICD_FILENAMES':'%s' % dri_path.join('intel_icd.x86_64.json'), |
| 593 | }) |
| 594 | else: |
| 595 | # Even the non-vulkan NUC jobs could benefit from the newer drivers. |
| 596 | env.update({ |
| 597 | 'LD_LIBRARY_PATH': dri_path, |
| 598 | 'LIBGL_DRIVERS_PATH': dri_path, |
| 599 | }) |
Kevin Lubick | 0a51b48 | 2017-02-06 12:45:29 -0500 | [diff] [blame] | 600 | |
Ben Wagner | 46df2a1 | 2017-02-21 19:10:24 -0500 | [diff] [blame] | 601 | # See skia:2789. |
| 602 | if '_AbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''): |
| 603 | args.append('--abandonGpuContext') |
| 604 | if '_PreAbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''): |
| 605 | args.append('--preAbandonGpuContext') |
| 606 | |
Eric Boren | 53262d0 | 2017-03-20 15:40:12 -0400 | [diff] [blame] | 607 | with api.step.context({'env': env}): |
| 608 | api.run(api.flavor.step, 'dm', cmd=args, abort_on_failure=False) |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 609 | |
| 610 | if api.vars.upload_dm_results: |
| 611 | # Copy images and JSON to host machine if needed. |
| 612 | api.flavor.copy_directory_contents_to_host( |
| 613 | api.flavor.device_dirs.dm_dir, api.vars.dm_dir) |
| 614 | |
Eric Boren | 7e97dc0 | 2017-02-02 09:02:37 -0500 | [diff] [blame] | 615 | |
| 616 | class TestApi(recipe_api.RecipeApi): |
| 617 | def run(self): |
| 618 | self.m.core.setup() |
Eric Boren | bbb24f2 | 2017-03-21 08:20:33 -0400 | [diff] [blame] | 619 | env = self.m.step.get_from_context('env', {}) |
Mike Klein | 3b36c06 | 2017-02-06 13:44:12 -0500 | [diff] [blame] | 620 | if 'iOS' in self.m.vars.builder_name: |
Eric Boren | bbb24f2 | 2017-03-21 08:20:33 -0400 | [diff] [blame] | 621 | env['IOS_BUNDLE_ID'] = 'com.google.dm' |
| 622 | with self.m.step.context({'env': env}): |
| 623 | try: |
| 624 | self.m.flavor.install_everything() |
| 625 | test_steps(self.m) |
| 626 | finally: |
| 627 | self.m.flavor.cleanup_steps() |
| 628 | self.m.run.check_failure() |