borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [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 | DEPS = [ |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 10 | 'build/file', |
borenet | 1436a09 | 2016-08-03 08:23:10 -0700 | [diff] [blame] | 11 | 'core', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 12 | 'recipe_engine/json', |
| 13 | 'recipe_engine/path', |
| 14 | 'recipe_engine/platform', |
| 15 | 'recipe_engine/properties', |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 16 | 'recipe_engine/python', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 17 | 'recipe_engine/raw_io', |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 18 | 'flavor', |
borenet | 1436a09 | 2016-08-03 08:23:10 -0700 | [diff] [blame] | 19 | 'run', |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 20 | 'vars', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 21 | ] |
| 22 | |
| 23 | |
| 24 | TEST_BUILDERS = { |
| 25 | 'client.skia': { |
| 26 | 'skiabot-linux-swarm-000': [ |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 27 | 'Test-Android-GCC-AndroidOne-GPU-Mali400MP2-Arm7-Release', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 28 | 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 29 | 'Test-Android-GCC-Nexus10-GPU-MaliT604-Arm7-Release', |
| 30 | 'Test-Android-GCC-Nexus6-GPU-Adreno420-Arm7-Debug', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 31 | 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 32 | 'Test-Android-GCC-Nexus9-CPU-Denver-Arm64-Debug', |
| 33 | 'Test-Android-GCC-NexusPlayer-CPU-SSE4-x86-Release', |
| 34 | 'Test-Android-GCC-NVIDIA_Shield-GPU-TegraX1-Arm64-Debug', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 35 | 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 36 | 'Test-Mac-Clang-MacMini4.1-GPU-GeForce320M-x86_64-Debug', |
| 37 | 'Test-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Debug', |
| 38 | 'Test-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 39 | 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 40 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 41 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug', |
| 42 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN', |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 43 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Shared', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 44 | 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-TSAN', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 45 | 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 46 | 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug-Vulkan', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 47 | 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot', |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 48 | 'Test-Win8-MSVC-ShuttleB-GPU-GTX960-x86_64-Debug-ANGLE', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 49 | ], |
| 50 | }, |
| 51 | } |
| 52 | |
| 53 | |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 54 | def dm_flags(bot): |
| 55 | args = [] |
| 56 | |
| 57 | # 32-bit desktop bots tend to run out of memory, because they have relatively |
| 58 | # far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit. |
| 59 | if '-x86-' in bot and not 'NexusPlayer' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 60 | args.extend('--threads 4'.split(' ')) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 61 | |
| 62 | # These are the canonical configs that we would ideally run on all bots. We |
| 63 | # may opt out or substitute some below for specific bots |
| 64 | configs = ['565', '8888', 'gpu', 'gpusrgb', 'pdf'] |
| 65 | # Add in either msaa4 or msaa16 to the canonical set of configs to run |
| 66 | if 'Android' in bot or 'iOS' in bot: |
| 67 | configs.append('msaa4') |
| 68 | else: |
| 69 | configs.append('msaa16') |
| 70 | |
| 71 | # With msaa, the S4 crashes and the NP produces a long error stream when we |
| 72 | # run with MSAA. The Tegra2 and Tegra3 just don't support it. No record of |
| 73 | # why we're not running msaa on iOS, probably started with gpu config and just |
| 74 | # haven't tried. |
| 75 | if ('GalaxyS4' in bot or |
| 76 | 'NexusPlayer' in bot or |
| 77 | 'Tegra3' in bot or |
| 78 | 'iOS' in bot): |
| 79 | configs = [x for x in configs if 'msaa' not in x] |
| 80 | |
| 81 | # Runs out of memory on Android bots and Daisy. Everyone else seems fine. |
| 82 | if 'Android' in bot or 'Daisy' in bot: |
| 83 | configs.remove('pdf') |
| 84 | |
| 85 | if '-GCE-' in bot: |
| 86 | configs.extend(['f16', 'srgb']) # Gamma-correct formats. |
| 87 | configs.extend(['sp-8888', '2ndpic-8888']) # Test niche uses of SkPicture. |
mtklein | 03591a7 | 2016-08-07 13:35:46 -0700 | [diff] [blame] | 88 | configs.extend(['lite-8888']) # Experimental display list. |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 89 | |
| 90 | if '-TSAN' not in bot: |
| 91 | if ('TegraK1' in bot or |
| 92 | 'TegraX1' in bot or |
| 93 | 'GTX550Ti' in bot or |
| 94 | 'GTX660' in bot or |
| 95 | 'GT610' in bot): |
| 96 | if 'Android' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 97 | configs.append('nvprdit4') |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 98 | else: |
| 99 | configs.append('nvprdit16') |
| 100 | |
| 101 | # We want to test the OpenGL config not the GLES config on the X1 |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 102 | if 'TegraX1' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 103 | configs = [x.replace('gpu', 'gl') for x in configs] |
| 104 | configs = [x.replace('msaa', 'glmsaa') for x in configs] |
| 105 | configs = [x.replace('nvpr', 'glnvpr') for x in configs] |
| 106 | |
| 107 | # NP is running out of RAM when we run all these modes. skia:3255 |
| 108 | if 'NexusPlayer' not in bot: |
| 109 | configs.extend(mode + '-8888' for mode in |
| 110 | ['serialize', 'tiles_rt', 'pic']) |
| 111 | |
| 112 | if 'ANGLE' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 113 | configs.append('angle') |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 114 | |
| 115 | # We want to run gpudft on atleast the mali 400 |
| 116 | if 'GalaxyS3' in bot: |
| 117 | configs.append('gpudft') |
| 118 | |
| 119 | # Test instanced rendering on a limited number of platforms |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 120 | if 'Nexus6' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 121 | configs.append('esinst') # esinst4 isn't working yet on Adreno. |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 122 | elif 'TegraX1' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 123 | # Multisampled instanced configs use nvpr. |
| 124 | configs = [x.replace('glnvpr', 'glinst') for x in configs] |
| 125 | configs.append('glinst') |
| 126 | elif 'MacMini6.2' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 127 | configs.extend(['glinst', 'glinst16']) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 128 | |
| 129 | # CommandBuffer bot *only* runs the command_buffer config. |
| 130 | if 'CommandBuffer' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 131 | configs = ['commandbuffer'] |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 132 | |
| 133 | # Vulkan bot *only* runs the vk config. |
| 134 | if 'Vulkan' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 135 | configs = ['vk'] |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 136 | |
| 137 | args.append('--config') |
| 138 | args.extend(configs) |
| 139 | |
| 140 | # Run tests, gms, and image decoding tests everywhere. |
rmistry | 70c43ef | 2016-08-12 07:25:53 -0700 | [diff] [blame] | 141 | args.extend('--src tests gm image colorImage svg'.split(' ')) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 142 | |
| 143 | if 'GalaxyS' in bot: |
| 144 | args.extend(('--threads', '0')) |
| 145 | |
| 146 | blacklist = [] |
| 147 | |
| 148 | # TODO: ??? |
| 149 | blacklist.extend('f16 _ _ dstreadshuffle'.split(' ')) |
| 150 | blacklist.extend('f16 image _ _'.split(' ')) |
| 151 | blacklist.extend('srgb image _ _'.split(' ')) |
| 152 | blacklist.extend('gpusrgb image _ _'.split(' ')) |
| 153 | |
| 154 | if 'Valgrind' in bot: |
| 155 | # These take 18+ hours to run. |
| 156 | blacklist.extend('pdf gm _ fontmgr_iter'.split(' ')) |
| 157 | blacklist.extend('pdf _ _ PANO_20121023_214540.jpg'.split(' ')) |
| 158 | blacklist.extend('pdf skp _ worldjournal'.split(' ')) |
| 159 | blacklist.extend('pdf skp _ desk_baidu.skp'.split(' ')) |
| 160 | blacklist.extend('pdf skp _ desk_wikipedia.skp'.split(' ')) |
| 161 | |
| 162 | if 'iOS' in bot: |
| 163 | blacklist.extend('gpu skp _ _ msaa skp _ _'.split(' ')) |
| 164 | blacklist.extend('msaa16 gm _ tilemodesProcess'.split(' ')) |
| 165 | |
| 166 | if 'Mac' in bot or 'iOS' in bot: |
| 167 | # CG fails on questionable bmps |
| 168 | blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) |
| 169 | blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) |
| 170 | blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) |
| 171 | blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) |
| 172 | blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) |
| 173 | blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) |
| 174 | blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) |
| 175 | |
| 176 | # CG has unpredictable behavior on this questionable gif |
| 177 | # It's probably using uninitialized memory |
| 178 | blacklist.extend('_ image gen_platf frame_larger_than_image.gif'.split(' ')) |
| 179 | |
| 180 | # WIC fails on questionable bmps |
| 181 | if 'Win' in bot: |
| 182 | blacklist.extend('_ image gen_platf rle8-height-negative.bmp'.split(' ')) |
| 183 | blacklist.extend('_ image gen_platf rle4-height-negative.bmp'.split(' ')) |
| 184 | blacklist.extend('_ image gen_platf pal8os2v2.bmp'.split(' ')) |
| 185 | blacklist.extend('_ image gen_platf pal8os2v2-16.bmp'.split(' ')) |
| 186 | blacklist.extend('_ image gen_platf rgba32abf.bmp'.split(' ')) |
| 187 | blacklist.extend('_ image gen_platf rgb24prof.bmp'.split(' ')) |
| 188 | blacklist.extend('_ image gen_platf rgb24lprof.bmp'.split(' ')) |
| 189 | blacklist.extend('_ image gen_platf 8bpp-pixeldata-cropped.bmp'.split(' ')) |
| 190 | blacklist.extend('_ image gen_platf 4bpp-pixeldata-cropped.bmp'.split(' ')) |
| 191 | blacklist.extend('_ image gen_platf 32bpp-pixeldata-cropped.bmp'.split(' ')) |
| 192 | blacklist.extend('_ image gen_platf 24bpp-pixeldata-cropped.bmp'.split(' ')) |
| 193 | if 'x86_64' in bot and 'CPU' in bot: |
| 194 | # This GM triggers a SkSmallAllocator assert. |
| 195 | blacklist.extend('_ gm _ composeshader_bitmap'.split(' ')) |
| 196 | |
| 197 | if 'Android' in bot or 'iOS' in bot: |
| 198 | # This test crashes the N9 (perhaps because of large malloc/frees). It also |
| 199 | # is fairly slow and not platform-specific. So we just disable it on all of |
| 200 | # Android and iOS. skia:5438 |
| 201 | blacklist.extend('_ test _ GrShape'.split(' ')) |
| 202 | |
| 203 | if 'Win8' in bot: |
| 204 | # bungeman: "Doesn't work on Windows anyway, produces unstable GMs with |
| 205 | # 'Unexpected error' from DirectWrite" |
| 206 | blacklist.extend('_ gm _ fontscalerdistortable'.split(' ')) |
fmalita | b5b6de9 | 2016-08-16 07:08:48 -0700 | [diff] [blame] | 207 | # skia:5636 |
| 208 | blacklist.extend('_ svg _ Nebraska-StateSeal.svg'.split(' ')) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 209 | |
| 210 | # skia:4095 |
| 211 | bad_serialize_gms = ['bleed_image', |
| 212 | 'c_gms', |
| 213 | 'colortype', |
| 214 | 'colortype_xfermodes', |
| 215 | 'drawfilter', |
| 216 | 'fontmgr_bounds_0.75_0', |
| 217 | 'fontmgr_bounds_1_-0.25', |
| 218 | 'fontmgr_bounds', |
| 219 | 'fontmgr_match', |
fmalita | ce2fc6a | 2016-08-26 10:13:39 -0700 | [diff] [blame] | 220 | 'fontmgr_iter', |
| 221 | 'imagemasksubset'] |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 222 | |
| 223 | # skia:5589 |
| 224 | bad_serialize_gms.extend(['bitmapfilters', |
| 225 | 'bitmapshaders', |
| 226 | 'bleed', |
| 227 | 'bleed_alpha_bmp', |
| 228 | 'bleed_alpha_bmp_shader', |
| 229 | 'convex_poly_clip', |
| 230 | 'extractalpha', |
| 231 | 'filterbitmap_checkerboard_32_32_g8', |
| 232 | 'filterbitmap_image_mandrill_64', |
| 233 | 'shadows', |
| 234 | 'simpleaaclip_aaclip']) |
| 235 | # skia:5595 |
| 236 | bad_serialize_gms.extend(['composeshader_bitmap', |
| 237 | 'scaled_tilemodes_npot', |
| 238 | 'scaled_tilemodes']) |
| 239 | for test in bad_serialize_gms: |
| 240 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
| 241 | |
| 242 | if 'Mac' not in bot: |
| 243 | for test in ['bleed_alpha_image', 'bleed_alpha_image_shader']: |
| 244 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
| 245 | # It looks like we skip these only for out-of-memory concerns. |
| 246 | if 'Win' in bot or 'Android' in bot: |
| 247 | for test in ['verylargebitmap', 'verylarge_picture_image']: |
| 248 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
| 249 | |
| 250 | # skia:4769 |
| 251 | for test in ['drawfilter']: |
| 252 | blacklist.extend([ 'sp-8888', 'gm', '_', test]) |
| 253 | blacklist.extend([ 'pic-8888', 'gm', '_', test]) |
| 254 | blacklist.extend(['2ndpic-8888', 'gm', '_', test]) |
mtklein | 03591a7 | 2016-08-07 13:35:46 -0700 | [diff] [blame] | 255 | blacklist.extend([ 'lite-8888', 'gm', '_', test]) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 256 | # skia:4703 |
| 257 | for test in ['image-cacherator-from-picture', |
| 258 | 'image-cacherator-from-raster', |
| 259 | 'image-cacherator-from-ctable']: |
| 260 | blacklist.extend([ 'sp-8888', 'gm', '_', test]) |
| 261 | blacklist.extend([ 'pic-8888', 'gm', '_', test]) |
| 262 | blacklist.extend([ '2ndpic-8888', 'gm', '_', test]) |
| 263 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
| 264 | |
brianosman | 2c4b64e | 2016-09-07 07:04:44 -0700 | [diff] [blame] | 265 | # GM that requires raster-backed canvas |
| 266 | for test in ['gamut']: |
| 267 | blacklist.extend([ 'sp-8888', 'gm', '_', test]) |
| 268 | blacklist.extend([ 'pic-8888', 'gm', '_', test]) |
| 269 | blacklist.extend([ 'lite-8888', 'gm', '_', test]) |
| 270 | blacklist.extend([ '2ndpic-8888', 'gm', '_', test]) |
| 271 | blacklist.extend(['serialize-8888', 'gm', '_', test]) |
| 272 | |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 273 | # Extensions for RAW images |
| 274 | r = ["arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", |
| 275 | "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW"] |
| 276 | |
| 277 | # skbug.com/4888 |
| 278 | # Blacklist RAW images (and a few large PNGs) on GPU bots |
| 279 | # until we can resolve failures |
| 280 | if 'GPU' in bot: |
| 281 | blacklist.extend('_ image _ interlaced1.png'.split(' ')) |
| 282 | blacklist.extend('_ image _ interlaced2.png'.split(' ')) |
| 283 | blacklist.extend('_ image _ interlaced3.png'.split(' ')) |
| 284 | for raw_ext in r: |
| 285 | blacklist.extend(('_ image _ .%s' % raw_ext).split(' ')) |
| 286 | |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 287 | if 'Nexus9' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 288 | for raw_ext in r: |
| 289 | blacklist.extend(('_ image _ .%s' % raw_ext).split(' ')) |
| 290 | |
| 291 | # Large image that overwhelms older Mac bots |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 292 | if 'MacMini4.1-GPU' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 293 | blacklist.extend('_ image _ abnormal.wbmp'.split(' ')) |
| 294 | blacklist.extend(['msaa16', 'gm', '_', 'blurcircles']) |
| 295 | |
| 296 | match = [] |
| 297 | if 'Valgrind' in bot: # skia:3021 |
| 298 | match.append('~Threaded') |
| 299 | |
| 300 | if 'GalaxyS3' in bot: # skia:1699 |
| 301 | match.append('~WritePixels') |
| 302 | |
| 303 | if 'AndroidOne' in bot: # skia:4711 |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 304 | match.append('~WritePixels') |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 305 | |
| 306 | if 'NexusPlayer' in bot: |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 307 | match.append('~ResourceCache') |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 308 | |
| 309 | if 'Nexus10' in bot: # skia:5509 |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 310 | match.append('~CopySurface') |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 311 | |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 312 | if 'ANGLE' in bot and 'Debug' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 313 | match.append('~GLPrograms') # skia:4717 |
| 314 | |
| 315 | if 'MSAN' in bot: |
| 316 | match.extend(['~Once', '~Shared']) # Not sure what's up with these tests. |
| 317 | |
borenet | 2c3112d | 2016-08-05 06:30:10 -0700 | [diff] [blame] | 318 | if 'TSAN' in bot: |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 319 | match.extend(['~ReadWriteAlpha']) # Flaky on TSAN-covered on nvidia bots. |
| 320 | |
| 321 | if blacklist: |
| 322 | args.append('--blacklist') |
| 323 | args.extend(blacklist) |
| 324 | |
| 325 | if match: |
| 326 | args.append('--match') |
| 327 | args.extend(match) |
| 328 | |
| 329 | # These bots run out of memory running RAW codec tests. Do not run them in |
| 330 | # parallel |
| 331 | if ('NexusPlayer' in bot or 'Nexus5' in bot or 'Nexus9' in bot |
| 332 | or 'Win8-MSVC-ShuttleB' in bot): |
| 333 | args.append('--noRAW_threading') |
| 334 | |
| 335 | return args |
| 336 | |
| 337 | |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 338 | def key_params(api): |
| 339 | """Build a unique key from the builder name (as a list). |
| 340 | |
| 341 | E.g. arch x86 gpu GeForce320M mode MacMini4.1 os Mac10.6 |
| 342 | """ |
| 343 | # Don't bother to include role, which is always Test. |
| 344 | # TryBots are uploaded elsewhere so they can use the same key. |
| 345 | blacklist = ['role', 'is_trybot'] |
| 346 | |
| 347 | flat = [] |
| 348 | for k in sorted(api.vars.builder_cfg.keys()): |
| 349 | if k not in blacklist: |
| 350 | flat.append(k) |
| 351 | flat.append(api.vars.builder_cfg[k]) |
| 352 | return flat |
| 353 | |
| 354 | |
| 355 | def test_steps(api): |
| 356 | """Run the DM test.""" |
| 357 | use_hash_file = False |
| 358 | if api.vars.upload_dm_results: |
| 359 | # This must run before we write anything into |
| 360 | # api.flavor.device_dirs.dm_dir or we may end up deleting our |
| 361 | # output on machines where they're the same. |
| 362 | api.flavor.create_clean_host_dir(api.vars.dm_dir) |
| 363 | host_dm_dir = str(api.vars.dm_dir) |
| 364 | device_dm_dir = str(api.flavor.device_dirs.dm_dir) |
| 365 | if host_dm_dir != device_dm_dir: |
| 366 | api.flavor.create_clean_device_dir(device_dm_dir) |
| 367 | |
| 368 | # Obtain the list of already-generated hashes. |
| 369 | hash_filename = 'uninteresting_hashes.txt' |
| 370 | |
| 371 | # Ensure that the tmp_dir exists. |
| 372 | api.run.run_once(api.file.makedirs, |
| 373 | 'tmp_dir', |
| 374 | api.vars.tmp_dir, |
| 375 | infra_step=True) |
| 376 | |
| 377 | host_hashes_file = api.vars.tmp_dir.join(hash_filename) |
| 378 | hashes_file = api.flavor.device_path_join( |
| 379 | api.flavor.device_dirs.tmp_dir, hash_filename) |
| 380 | api.run( |
| 381 | api.python.inline, |
| 382 | 'get uninteresting hashes', |
| 383 | program=""" |
| 384 | import contextlib |
| 385 | import math |
| 386 | import socket |
| 387 | import sys |
| 388 | import time |
| 389 | import urllib2 |
| 390 | |
| 391 | HASHES_URL = 'https://gold.skia.org/_/hashes' |
| 392 | RETRIES = 5 |
| 393 | TIMEOUT = 60 |
| 394 | WAIT_BASE = 15 |
| 395 | |
| 396 | socket.setdefaulttimeout(TIMEOUT) |
| 397 | for retry in range(RETRIES): |
| 398 | try: |
| 399 | with contextlib.closing( |
| 400 | urllib2.urlopen(HASHES_URL, timeout=TIMEOUT)) as w: |
| 401 | hashes = w.read() |
| 402 | with open(sys.argv[1], 'w') as f: |
| 403 | f.write(hashes) |
| 404 | break |
| 405 | except Exception as e: |
| 406 | print 'Failed to get uninteresting hashes from %s:' % HASHES_URL |
| 407 | print e |
| 408 | if retry == RETRIES: |
| 409 | raise |
| 410 | waittime = WAIT_BASE * math.pow(2, retry) |
| 411 | print 'Retry in %d seconds.' % waittime |
| 412 | time.sleep(waittime) |
| 413 | """, |
| 414 | args=[host_hashes_file], |
| 415 | cwd=api.vars.skia_dir, |
| 416 | abort_on_failure=False, |
| 417 | fail_build_on_failure=False, |
| 418 | infra_step=True) |
| 419 | |
| 420 | if api.path.exists(host_hashes_file): |
| 421 | api.flavor.copy_file_to_device(host_hashes_file, hashes_file) |
| 422 | use_hash_file = True |
| 423 | |
| 424 | # Run DM. |
| 425 | properties = [ |
| 426 | 'gitHash', api.vars.got_revision, |
| 427 | 'master', api.vars.master_name, |
| 428 | 'builder', api.vars.builder_name, |
| 429 | 'build_number', api.vars.build_number, |
| 430 | ] |
| 431 | if api.vars.is_trybot: |
| 432 | properties.extend([ |
rmistry | 3f1c9c0 | 2016-08-24 05:07:06 -0700 | [diff] [blame] | 433 | 'issue', api.vars.issue, |
| 434 | 'patchset', api.vars.patchset, |
| 435 | 'patch_storage', api.vars.patch_storage, |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 436 | ]) |
| 437 | |
| 438 | args = [ |
| 439 | 'dm', |
| 440 | '--undefok', # This helps branches that may not know new flags. |
| 441 | '--resourcePath', api.flavor.device_dirs.resource_dir, |
| 442 | '--skps', api.flavor.device_dirs.skp_dir, |
| 443 | '--images', api.flavor.device_path_join( |
| 444 | api.flavor.device_dirs.images_dir, 'dm'), |
| 445 | '--colorImages', api.flavor.device_path_join( |
| 446 | api.flavor.device_dirs.images_dir, 'colorspace'), |
| 447 | '--nameByHash', |
| 448 | '--properties' |
| 449 | ] + properties |
| 450 | |
rmistry | 70c43ef | 2016-08-12 07:25:53 -0700 | [diff] [blame] | 451 | args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 452 | |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 453 | args.append('--key') |
| 454 | args.extend(key_params(api)) |
| 455 | if use_hash_file: |
| 456 | args.extend(['--uninterestingHashesFile', hashes_file]) |
| 457 | if api.vars.upload_dm_results: |
| 458 | args.extend(['--writePath', api.flavor.device_dirs.dm_dir]) |
| 459 | |
| 460 | skip_flag = None |
| 461 | if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
| 462 | skip_flag = '--nogpu' |
| 463 | elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
| 464 | skip_flag = '--nocpu' |
| 465 | if skip_flag: |
| 466 | args.append(skip_flag) |
borenet | e2251ac | 2016-08-05 05:40:59 -0700 | [diff] [blame] | 467 | args.extend(dm_flags(api.vars.builder_name)) |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 468 | |
| 469 | api.run(api.flavor.step, 'dm', cmd=args, |
borenet | d460a3c | 2016-08-05 05:18:05 -0700 | [diff] [blame] | 470 | abort_on_failure=False, |
| 471 | env=api.vars.default_env) |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 472 | |
| 473 | if api.vars.upload_dm_results: |
| 474 | # Copy images and JSON to host machine if needed. |
| 475 | api.flavor.copy_directory_contents_to_host( |
| 476 | api.flavor.device_dirs.dm_dir, api.vars.dm_dir) |
| 477 | |
| 478 | # See skia:2789. |
| 479 | if ('Valgrind' in api.vars.builder_name and |
| 480 | api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU'): |
| 481 | abandonGpuContext = list(args) |
| 482 | abandonGpuContext.append('--abandonGpuContext') |
| 483 | api.run(api.flavor.step, 'dm --abandonGpuContext', |
| 484 | cmd=abandonGpuContext, abort_on_failure=False) |
| 485 | preAbandonGpuContext = list(args) |
| 486 | preAbandonGpuContext.append('--preAbandonGpuContext') |
| 487 | api.run(api.flavor.step, 'dm --preAbandonGpuContext', |
| 488 | cmd=preAbandonGpuContext, abort_on_failure=False, |
| 489 | env=api.vars.default_env) |
| 490 | |
| 491 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 492 | def RunSteps(api): |
borenet | 1436a09 | 2016-08-03 08:23:10 -0700 | [diff] [blame] | 493 | api.core.setup() |
borenet | bc20a70 | 2016-08-03 10:38:44 -0700 | [diff] [blame] | 494 | api.flavor.install() |
| 495 | test_steps(api) |
| 496 | api.flavor.cleanup_steps() |
borenet | 1436a09 | 2016-08-03 08:23:10 -0700 | [diff] [blame] | 497 | api.run.check_failure() |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 498 | |
| 499 | |
| 500 | def GenTests(api): |
| 501 | def AndroidTestData(builder, adb=None): |
| 502 | test_data = ( |
| 503 | api.step_data( |
| 504 | 'get EXTERNAL_STORAGE dir', |
| 505 | stdout=api.raw_io.output('/storage/emulated/legacy')) + |
| 506 | api.step_data( |
| 507 | 'read SKP_VERSION', |
| 508 | stdout=api.raw_io.output('42')) + |
| 509 | api.step_data( |
| 510 | 'read SK_IMAGE_VERSION', |
| 511 | stdout=api.raw_io.output('42')) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 512 | api.step_data( |
| 513 | 'read SVG_VERSION', |
| 514 | stdout=api.raw_io.output('42')) + |
| 515 | api.step_data( |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 516 | 'exists skia_dm', |
| 517 | stdout=api.raw_io.output('')) |
| 518 | ) |
| 519 | if 'GalaxyS3' not in builder: |
| 520 | test_data += api.step_data( |
| 521 | 'adb root', |
| 522 | stdout=api.raw_io.output('restarting adbd as root')) |
| 523 | if adb: |
| 524 | test_data += api.step_data( |
| 525 | 'which adb', |
| 526 | stdout=api.raw_io.output(adb)) |
| 527 | else: |
| 528 | test_data += api.step_data( |
| 529 | 'which adb', |
| 530 | retcode=1) |
| 531 | |
| 532 | return test_data |
| 533 | |
| 534 | for mastername, slaves in TEST_BUILDERS.iteritems(): |
| 535 | for slavename, builders_by_slave in slaves.iteritems(): |
| 536 | for builder in builders_by_slave: |
| 537 | test = ( |
| 538 | api.test(builder) + |
| 539 | api.properties(buildername=builder, |
| 540 | mastername=mastername, |
| 541 | slavename=slavename, |
| 542 | buildnumber=5, |
| 543 | revision='abc123', |
| 544 | path_config='kitchen', |
| 545 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 546 | api.path.exists( |
| 547 | api.path['slave_build'].join('skia'), |
| 548 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 549 | 'skimage', 'VERSION'), |
| 550 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 551 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 552 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 553 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 554 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 555 | ) |
| 556 | ) |
| 557 | if ('Android' in builder and |
| 558 | ('Test' in builder or 'Perf' in builder) and |
| 559 | not 'Appurify' in builder): |
| 560 | test += AndroidTestData(builder) |
| 561 | if 'Trybot' in builder: |
| 562 | test += api.properties(issue=500, |
| 563 | patchset=1, |
| 564 | rietveld='https://codereview.chromium.org') |
| 565 | if 'Win' in builder: |
| 566 | test += api.platform('win', 64) |
| 567 | |
| 568 | |
| 569 | yield test |
| 570 | |
| 571 | builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' |
| 572 | yield ( |
| 573 | api.test('failed_dm') + |
| 574 | api.properties(buildername=builder, |
| 575 | mastername='client.skia', |
| 576 | slavename='skiabot-linux-swarm-000', |
| 577 | buildnumber=6, |
| 578 | revision='abc123', |
| 579 | path_config='kitchen', |
| 580 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 581 | api.path.exists( |
| 582 | api.path['slave_build'].join('skia'), |
| 583 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 584 | 'skimage', 'VERSION'), |
| 585 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 586 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 587 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 588 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 589 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 590 | ) + |
| 591 | api.step_data('dm', retcode=1) |
| 592 | ) |
| 593 | |
| 594 | builder = 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug' |
| 595 | yield ( |
| 596 | api.test('failed_get_hashes') + |
| 597 | api.properties(buildername=builder, |
| 598 | mastername='client.skia', |
| 599 | slavename='skiabot-linux-swarm-000', |
| 600 | buildnumber=6, |
| 601 | revision='abc123', |
| 602 | path_config='kitchen', |
| 603 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 604 | api.path.exists( |
| 605 | api.path['slave_build'].join('skia'), |
| 606 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 607 | 'skimage', 'VERSION'), |
| 608 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 609 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 610 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 611 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 612 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 613 | ) + |
| 614 | AndroidTestData(builder) + |
| 615 | api.step_data('read SKP_VERSION', |
| 616 | stdout=api.raw_io.output('42')) + |
| 617 | api.step_data('read SK_IMAGE_VERSION', |
| 618 | stdout=api.raw_io.output('42')) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 619 | api.step_data('read SVG_VERSION', |
| 620 | stdout=api.raw_io.output('42')) + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 621 | api.step_data('get uninteresting hashes', retcode=1) |
| 622 | ) |
| 623 | |
| 624 | yield ( |
| 625 | api.test('download_and_push_skps') + |
| 626 | api.properties(buildername=builder, |
| 627 | mastername='client.skia', |
| 628 | slavename='skiabot-linux-swarm-000', |
| 629 | buildnumber=6, |
| 630 | revision='abc123', |
| 631 | path_config='kitchen', |
| 632 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 633 | api.path.exists( |
| 634 | api.path['slave_build'].join('skia'), |
| 635 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 636 | 'skimage', 'VERSION'), |
| 637 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 638 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 639 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 640 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 641 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 642 | ) + |
| 643 | AndroidTestData(builder) + |
| 644 | api.step_data('read SKP_VERSION', |
| 645 | stdout=api.raw_io.output('2')) + |
| 646 | api.step_data('read SK_IMAGE_VERSION', |
| 647 | stdout=api.raw_io.output('42')) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 648 | api.step_data('read SVG_VERSION', |
| 649 | stdout=api.raw_io.output('42')) + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 650 | api.step_data( |
| 651 | 'exists skps', |
| 652 | stdout=api.raw_io.output('')) |
| 653 | ) |
| 654 | |
| 655 | yield ( |
| 656 | api.test('missing_SKP_VERSION_device') + |
| 657 | api.properties(buildername=builder, |
| 658 | mastername='client.skia', |
| 659 | slavename='skiabot-linux-swarm-000', |
| 660 | buildnumber=6, |
| 661 | revision='abc123', |
| 662 | path_config='kitchen', |
| 663 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 664 | api.path.exists( |
| 665 | api.path['slave_build'].join('skia'), |
| 666 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 667 | 'skimage', 'VERSION'), |
| 668 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 669 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 670 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 671 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 672 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 673 | ) + |
| 674 | AndroidTestData(builder) + |
| 675 | api.step_data('read SKP_VERSION', |
| 676 | retcode=1) + |
| 677 | api.step_data('read SK_IMAGE_VERSION', |
| 678 | stdout=api.raw_io.output('42')) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 679 | api.step_data('read SVG_VERSION', |
| 680 | stdout=api.raw_io.output('42')) + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 681 | api.step_data( |
| 682 | 'exists skps', |
| 683 | stdout=api.raw_io.output('')) |
| 684 | ) |
| 685 | |
| 686 | yield ( |
| 687 | api.test('download_and_push_skimage') + |
| 688 | api.properties(buildername=builder, |
| 689 | mastername='client.skia', |
| 690 | slavename='skiabot-linux-swarm-000', |
| 691 | buildnumber=6, |
| 692 | revision='abc123', |
| 693 | path_config='kitchen', |
| 694 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 695 | api.path.exists( |
| 696 | api.path['slave_build'].join('skia'), |
| 697 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 698 | 'skimage', 'VERSION'), |
| 699 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 700 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 701 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 702 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 703 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 704 | ) + |
| 705 | AndroidTestData(builder) + |
| 706 | api.step_data('read SKP_VERSION', |
| 707 | stdout=api.raw_io.output('42')) + |
| 708 | api.step_data('read SK_IMAGE_VERSION', |
| 709 | stdout=api.raw_io.output('2')) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 710 | api.step_data('read SVG_VERSION', |
| 711 | stdout=api.raw_io.output('42')) + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 712 | api.step_data( |
| 713 | 'exists skia_images', |
| 714 | stdout=api.raw_io.output('')) |
| 715 | ) |
| 716 | |
| 717 | yield ( |
| 718 | api.test('missing_SK_IMAGE_VERSION_device') + |
| 719 | api.properties(buildername=builder, |
| 720 | mastername='client.skia', |
| 721 | slavename='skiabot-linux-swarm-000', |
| 722 | buildnumber=6, |
| 723 | revision='abc123', |
| 724 | path_config='kitchen', |
| 725 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 726 | api.path.exists( |
| 727 | api.path['slave_build'].join('skia'), |
| 728 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 729 | 'skimage', 'VERSION'), |
| 730 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 731 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 732 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 733 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 734 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 735 | ) + |
| 736 | AndroidTestData(builder) + |
| 737 | api.step_data('read SKP_VERSION', |
| 738 | stdout=api.raw_io.output('42')) + |
| 739 | api.step_data('read SK_IMAGE_VERSION', |
| 740 | retcode=1) + |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 741 | api.step_data('read SVG_VERSION', |
| 742 | stdout=api.raw_io.output('42')) + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 743 | api.step_data( |
| 744 | 'exists skia_images', |
| 745 | stdout=api.raw_io.output('')) |
| 746 | ) |
| 747 | |
| 748 | yield ( |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 749 | api.test('download_and_push_svgs') + |
| 750 | api.properties(buildername=builder, |
| 751 | mastername='client.skia', |
| 752 | slavename='skiabot-linux-swarm-000', |
| 753 | buildnumber=6, |
| 754 | revision='abc123', |
| 755 | path_config='kitchen', |
| 756 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 757 | api.path.exists( |
| 758 | api.path['slave_build'].join('skia'), |
| 759 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 760 | 'skimage', 'VERSION'), |
| 761 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 762 | 'skp', 'VERSION'), |
| 763 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 764 | 'svg', 'VERSION'), |
| 765 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 766 | ) + |
| 767 | AndroidTestData(builder) + |
| 768 | api.step_data('read SKP_VERSION', |
| 769 | stdout=api.raw_io.output('42')) + |
| 770 | api.step_data('read SK_IMAGE_VERSION', |
| 771 | stdout=api.raw_io.output('42')) + |
| 772 | api.step_data('read SVG_VERSION', |
| 773 | stdout=api.raw_io.output('2')) + |
| 774 | api.step_data( |
| 775 | 'exists svgs', |
| 776 | stdout=api.raw_io.output('')) |
| 777 | ) |
| 778 | |
| 779 | yield ( |
| 780 | api.test('missing_SVG_VERSION_device') + |
| 781 | api.properties(buildername=builder, |
| 782 | mastername='client.skia', |
| 783 | slavename='skiabot-linux-swarm-000', |
| 784 | buildnumber=6, |
| 785 | revision='abc123', |
| 786 | path_config='kitchen', |
| 787 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 788 | api.path.exists( |
| 789 | api.path['slave_build'].join('skia'), |
| 790 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 791 | 'skimage', 'VERSION'), |
| 792 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 793 | 'skp', 'VERSION'), |
| 794 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 795 | 'svg', 'VERSION'), |
| 796 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 797 | ) + |
| 798 | AndroidTestData(builder) + |
| 799 | api.step_data('read SKP_VERSION', |
| 800 | stdout=api.raw_io.output('42')) + |
| 801 | api.step_data('read SK_IMAGE_VERSION', |
| 802 | stdout=api.raw_io.output('42')) + |
| 803 | api.step_data('read SVG_VERSION', |
| 804 | retcode=1) + |
| 805 | api.step_data( |
| 806 | 'exists svgs', |
| 807 | stdout=api.raw_io.output('')) |
| 808 | ) |
| 809 | |
| 810 | yield ( |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 811 | api.test('adb_in_path') + |
| 812 | api.properties(buildername=builder, |
| 813 | mastername='client.skia', |
| 814 | slavename='skiabot-linux-swarm-000', |
| 815 | buildnumber=6, |
| 816 | revision='abc123', |
| 817 | path_config='kitchen', |
| 818 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 819 | api.path.exists( |
| 820 | api.path['slave_build'].join('skia'), |
| 821 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 822 | 'skimage', 'VERSION'), |
| 823 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 824 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 825 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 826 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 827 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 828 | ) + |
| 829 | AndroidTestData(builder, adb='/usr/bin/adb') + |
| 830 | api.step_data('read SKP_VERSION', |
| 831 | stdout=api.raw_io.output('42')) + |
| 832 | api.step_data('read SK_IMAGE_VERSION', |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 833 | stdout=api.raw_io.output('42')) + |
| 834 | api.step_data('read SVG_VERSION', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 835 | stdout=api.raw_io.output('42')) |
| 836 | ) |
| 837 | |
| 838 | builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot' |
| 839 | yield ( |
| 840 | api.test('big_issue_number') + |
| 841 | api.properties(buildername=builder, |
| 842 | mastername='client.skia.compile', |
| 843 | slavename='skiabot-linux-swarm-000', |
| 844 | buildnumber=5, |
| 845 | revision='abc123', |
| 846 | path_config='kitchen', |
| 847 | swarm_out_dir='[SWARM_OUT_DIR]', |
| 848 | rietveld='https://codereview.chromium.org', |
| 849 | patchset=1, |
| 850 | issue=2147533002L) + |
| 851 | api.path.exists( |
| 852 | api.path['slave_build'].join('skia'), |
| 853 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 854 | 'skimage', 'VERSION'), |
| 855 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 856 | 'skp', 'VERSION'), |
rmistry | bcba19d | 2016-08-11 12:36:58 -0700 | [diff] [blame] | 857 | api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 858 | 'svg', 'VERSION'), |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 859 | api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 860 | ) + |
| 861 | api.platform('win', 64) |
| 862 | ) |
rmistry | 3f1c9c0 | 2016-08-24 05:07:06 -0700 | [diff] [blame] | 863 | |
| 864 | builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86-Debug-Trybot' |
| 865 | gerrit_kwargs = { |
| 866 | 'patch_storage': 'gerrit', |
| 867 | 'repository': 'skia', |
| 868 | 'event.patchSet.ref': 'refs/changes/00/2100/2', |
| 869 | 'event.change.number': '2100', |
| 870 | } |
| 871 | yield ( |
| 872 | api.test('recipe_with_gerrit_patch') + |
| 873 | api.properties( |
| 874 | buildername=builder, |
| 875 | mastername='client.skia', |
| 876 | slavename='skiabot-linux-swarm-000', |
| 877 | buildnumber=5, |
| 878 | path_config='kitchen', |
| 879 | swarm_out_dir='[SWARM_OUT_DIR]', |
| 880 | revision='abc123', |
| 881 | **gerrit_kwargs) |
| 882 | ) |