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 perf. |
| 7 | |
| 8 | |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 9 | import calendar |
Kevin Lubick | 587afc9 | 2017-10-12 12:21:47 -0400 | [diff] [blame^] | 10 | import os |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 11 | |
| 12 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 13 | DEPS = [ |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 14 | 'core', |
Eric Boren | 896af75 | 2017-04-24 13:22:56 -0400 | [diff] [blame] | 15 | 'env', |
| 16 | 'flavor', |
Robert Iannucci | 8cd5041 | 2017-07-07 14:36:58 -0700 | [diff] [blame] | 17 | 'recipe_engine/file', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 18 | 'recipe_engine/json', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 19 | 'recipe_engine/path', |
| 20 | 'recipe_engine/platform', |
| 21 | 'recipe_engine/properties', |
| 22 | 'recipe_engine/raw_io', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 23 | 'recipe_engine/step', |
| 24 | 'recipe_engine/time', |
| 25 | 'run', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 26 | 'vars', |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 27 | ] |
| 28 | |
| 29 | |
Eric Boren | 89cd357 | 2017-06-28 13:50:22 -0400 | [diff] [blame] | 30 | def nanobench_flags(api, bot): |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 31 | args = ['--pre_log'] |
| 32 | |
| 33 | if 'GPU' in bot: |
| 34 | args.append('--images') |
| 35 | args.extend(['--gpuStatsDump', 'true']) |
| 36 | |
| 37 | if 'Android' in bot and 'GPU' in bot: |
| 38 | args.extend(['--useThermalManager', '1,1,10,1000']) |
| 39 | |
| 40 | args.extend(['--scales', '1.0', '1.1']) |
| 41 | |
| 42 | if 'iOS' in bot: |
| 43 | args.extend(['--skps', 'ignore_skps']) |
| 44 | |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 45 | configs = [] |
| 46 | if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
| 47 | args.append('--nogpu') |
| 48 | configs.extend(['8888', 'nonrendering']) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 49 | |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 50 | if '-arm-' not in bot: |
| 51 | # For Android CPU tests, these take too long and cause the task to time |
| 52 | # out. |
| 53 | configs += [ 'f16', 'srgb' ] |
| 54 | if '-GCE-' in bot: |
| 55 | configs += [ '565' ] |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 56 | |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 57 | elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
| 58 | args.append('--nocpu') |
| 59 | |
| 60 | gl_prefix = 'gl' |
| 61 | sample_count = '8' |
| 62 | if 'Android' in bot or 'iOS' in bot: |
| 63 | sample_count = '4' |
| 64 | # The NVIDIA_Shield has a regular OpenGL implementation. We bench that |
| 65 | # instead of ES. |
| 66 | if 'NVIDIA_Shield' not in bot: |
| 67 | gl_prefix = 'gles' |
| 68 | # The NP produces a long error stream when we run with MSAA. |
| 69 | # iOS crashes (skia:6399) |
| 70 | # Nexus7 (Tegra3) does not support MSAA. |
| 71 | if ('NexusPlayer' in bot or |
| 72 | 'iOS' in bot or |
| 73 | 'Nexus7' in bot): |
| 74 | sample_count = '' |
| 75 | elif 'Intel' in bot: |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 76 | sample_count = '' |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 77 | elif 'ChromeOS' in bot: |
| 78 | gl_prefix = 'gles' |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 79 | |
Ben Wagner | 769faa2 | 2017-08-11 15:32:50 -0400 | [diff] [blame] | 80 | configs.extend([gl_prefix, gl_prefix + 'srgb']) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 81 | if sample_count is not '': |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 82 | configs.append(gl_prefix + 'msaa' + sample_count) |
| 83 | if ('TegraX1' in bot or |
| 84 | 'Quadro' in bot or |
| 85 | 'GTX' in bot or |
| 86 | ('GT610' in bot and 'Ubuntu17' not in bot)): |
| 87 | configs.extend([gl_prefix + 'nvpr' + sample_count, |
| 88 | gl_prefix + 'nvprdit' + sample_count]) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 89 | |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 90 | # We want to test both the OpenGL config and the GLES config on Linux Intel: |
| 91 | # GL is used by Chrome, GLES is used by ChromeOS. |
| 92 | if 'Intel' in bot and api.vars.is_linux: |
Ben Wagner | 769faa2 | 2017-08-11 15:32:50 -0400 | [diff] [blame] | 93 | configs.extend(['gles', 'glessrgb']) |
| 94 | |
| 95 | # The following devices do not support glessrgb. |
| 96 | if 'glessrgb' in configs: |
| 97 | if ('IntelHD405' in bot or |
| 98 | 'IntelIris540' in bot or |
| 99 | 'IntelIris640' in bot or |
| 100 | 'IntelBayTrail' in bot or |
| 101 | 'IntelHD2000' in bot or |
| 102 | 'AndroidOne' in bot or |
| 103 | 'Nexus7' in bot or |
| 104 | 'NexusPlayer' in bot): |
| 105 | configs.remove('glessrgb') |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 106 | |
| 107 | # Bench instanced rendering on a limited number of platforms |
| 108 | inst_config = gl_prefix + 'inst' |
Ben Wagner | cc4221b | 2017-08-17 17:29:04 -0400 | [diff] [blame] | 109 | if 'PixelC' in bot or 'NVIDIA_Shield' in bot or 'MacMini7.1' in bot: |
Ben Wagner | 135db05 | 2017-09-28 21:20:25 -0400 | [diff] [blame] | 110 | configs.append(inst_config) |
| 111 | if sample_count: |
| 112 | configs.append(inst_config + sample_count) |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 113 | |
| 114 | if 'CommandBuffer' in bot: |
| 115 | configs = ['commandbuffer'] |
| 116 | if 'Vulkan' in bot: |
| 117 | configs = ['vk'] |
| 118 | |
| 119 | if 'ANGLE' in bot: |
| 120 | # Test only ANGLE configs. |
| 121 | configs = ['angle_d3d11_es2'] |
| 122 | if sample_count is not '': |
| 123 | configs.append('angle_d3d11_es2_msaa' + sample_count) |
| 124 | |
| 125 | if 'ChromeOS' in bot: |
| 126 | # Just run GLES for now - maybe add gles_msaa4 in the future |
| 127 | configs = ['gles'] |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 128 | |
| 129 | args.append('--config') |
| 130 | args.extend(configs) |
| 131 | |
Brian Osman | c49d11e | 2017-09-22 09:44:35 -0400 | [diff] [blame] | 132 | # By default, we test with GPU threading enabled. Leave PixelC devices |
| 133 | # running without threads, just to get some coverage of that code path. |
| 134 | if 'PixelC' in bot: |
| 135 | args.extend(['--gpuThreads', '0']) |
| 136 | |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 137 | if 'Valgrind' in bot: |
| 138 | # Don't care about Valgrind performance. |
| 139 | args.extend(['--loops', '1']) |
| 140 | args.extend(['--samples', '1']) |
| 141 | # Ensure that the bot framework does not think we have timed out. |
| 142 | args.extend(['--keepAlive', 'true']) |
| 143 | |
Ben Wagner | 47ac024 | 2017-06-27 13:44:36 -0400 | [diff] [blame] | 144 | # Some people don't like verbose output. |
| 145 | verbose = False |
| 146 | |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 147 | match = [] |
| 148 | if 'Android' in bot: |
| 149 | # Segfaults when run as GPU bench. Very large texture? |
| 150 | match.append('~blurroundrect') |
| 151 | match.append('~patch_grid') # skia:2847 |
| 152 | match.append('~desk_carsvg') |
| 153 | if 'NexusPlayer' in bot: |
| 154 | match.append('~desk_unicodetable') |
| 155 | if 'Nexus5' in bot: |
| 156 | match.append('~keymobi_shop_mobileweb_ebay_com.skp') # skia:5178 |
| 157 | if 'iOS' in bot: |
| 158 | match.append('~blurroundrect') |
| 159 | match.append('~patch_grid') # skia:2847 |
| 160 | match.append('~desk_carsvg') |
| 161 | match.append('~keymobi') |
| 162 | match.append('~path_hairline') |
| 163 | match.append('~GLInstancedArraysBench') # skia:4714 |
| 164 | if 'IntelIris540' in bot and 'ANGLE' in bot: |
| 165 | match.append('~tile_image_filter_tiled_64') # skia:6082 |
Ben Wagner | 1aa2369 | 2017-06-09 10:24:39 -0400 | [diff] [blame] | 166 | if ('Vulkan' in bot and ('IntelIris540' in bot or 'IntelIris640' in bot) and |
| 167 | 'Win' in bot): |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 168 | # skia:6398 |
| 169 | match.append('~GM_varied_text_clipped_lcd') |
| 170 | match.append('~GM_varied_text_ignorable_clip_lcd') |
Mike Reed | 1d2678f | 2017-07-05 13:10:42 -0400 | [diff] [blame] | 171 | match.append('~blendmode_mask_DstATop') |
| 172 | match.append('~blendmode_mask_SrcIn') |
| 173 | match.append('~blendmode_mask_SrcOut') |
| 174 | match.append('~blendmode_mask_Src') |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 175 | match.append('~fontscaler_lcd') |
| 176 | match.append('~rotated_rects_aa_alternating_transparent_and_opaque_src') |
| 177 | match.append('~rotated_rects_aa_changing_transparent_src') |
| 178 | match.append('~rotated_rects_aa_same_transparent_src') |
| 179 | match.append('~shadermask_LCD_FF') |
| 180 | match.append('~srcmode_rects_1') |
| 181 | match.append('~text_16_LCD_88') |
| 182 | match.append('~text_16_LCD_BK') |
| 183 | match.append('~text_16_LCD_FF') |
| 184 | match.append('~text_16_LCD_WT') |
Greg Daniel | 139eb80 | 2017-07-19 10:12:49 -0400 | [diff] [blame] | 185 | # skia:6863 |
| 186 | match.append('~desk_skbug6850overlay2') |
Greg Daniel | e099653 | 2017-08-07 14:56:26 -0400 | [diff] [blame] | 187 | match.append('~desk_googlespreadsheet') |
Eric Boren | 89cd357 | 2017-06-28 13:50:22 -0400 | [diff] [blame] | 188 | if ('Intel' in bot and api.vars.is_linux and not 'Vulkan' in bot): |
Ben Wagner | 47ac024 | 2017-06-27 13:44:36 -0400 | [diff] [blame] | 189 | # TODO(dogben): Track down what's causing bots to die. |
| 190 | verbose = True |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 191 | if 'Vulkan' in bot and 'NexusPlayer' in bot: |
Greg Daniel | 514e9d8 | 2017-07-06 09:25:15 -0400 | [diff] [blame] | 192 | match.append('~blendmode_') # skia:6691 |
Ben Wagner | adf17dc | 2017-09-12 23:41:00 -0400 | [diff] [blame] | 193 | if 'float_cast_overflow' in bot and 'CPU' in bot: |
| 194 | # skia:4632 |
| 195 | match.append('~^floor2int_undef$') |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 196 | |
| 197 | # We do not need or want to benchmark the decodes of incomplete images. |
| 198 | # In fact, in nanobench we assert that the full image decode succeeds. |
| 199 | match.append('~inc0.gif') |
| 200 | match.append('~inc1.gif') |
| 201 | match.append('~incInterlaced.gif') |
| 202 | match.append('~inc0.jpg') |
| 203 | match.append('~incGray.jpg') |
| 204 | match.append('~inc0.wbmp') |
| 205 | match.append('~inc1.wbmp') |
| 206 | match.append('~inc0.webp') |
| 207 | match.append('~inc1.webp') |
| 208 | match.append('~inc0.ico') |
| 209 | match.append('~inc1.ico') |
| 210 | match.append('~inc0.png') |
| 211 | match.append('~inc1.png') |
| 212 | match.append('~inc2.png') |
| 213 | match.append('~inc12.png') |
| 214 | match.append('~inc13.png') |
| 215 | match.append('~inc14.png') |
| 216 | match.append('~inc0.webp') |
| 217 | match.append('~inc1.webp') |
| 218 | |
| 219 | if match: |
| 220 | args.append('--match') |
| 221 | args.extend(match) |
| 222 | |
Ben Wagner | 47ac024 | 2017-06-27 13:44:36 -0400 | [diff] [blame] | 223 | if verbose: |
| 224 | args.append('--verbose') |
| 225 | |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 226 | return args |
| 227 | |
| 228 | |
| 229 | def perf_steps(api): |
| 230 | """Run Skia benchmarks.""" |
| 231 | if api.vars.upload_perf_results: |
| 232 | api.flavor.create_clean_device_dir( |
| 233 | api.flavor.device_dirs.perf_data_dir) |
| 234 | |
| 235 | # Run nanobench. |
| 236 | properties = [ |
| 237 | '--properties', |
| 238 | 'gitHash', api.vars.got_revision, |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 239 | ] |
| 240 | if api.vars.is_trybot: |
| 241 | properties.extend([ |
| 242 | 'issue', api.vars.issue, |
| 243 | 'patchset', api.vars.patchset, |
| 244 | 'patch_storage', api.vars.patch_storage, |
| 245 | ]) |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 246 | properties.extend(['swarming_bot_id', api.vars.swarming_bot_id]) |
| 247 | properties.extend(['swarming_task_id', api.vars.swarming_task_id]) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 248 | |
| 249 | target = 'nanobench' |
| 250 | args = [ |
| 251 | target, |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 252 | '-i', api.flavor.device_dirs.resource_dir, |
| 253 | '--skps', api.flavor.device_dirs.skp_dir, |
| 254 | '--images', api.flavor.device_path_join( |
| 255 | api.flavor.device_dirs.images_dir, 'nanobench'), |
| 256 | ] |
| 257 | |
| 258 | # Do not run svgs on Valgrind. |
| 259 | if 'Valgrind' not in api.vars.builder_name: |
| 260 | if ('Vulkan' not in api.vars.builder_name or |
| 261 | 'NexusPlayer' not in api.vars.builder_name): |
| 262 | args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) |
| 263 | |
Eric Boren | 89cd357 | 2017-06-28 13:50:22 -0400 | [diff] [blame] | 264 | args.extend(nanobench_flags(api, api.vars.builder_name)) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 265 | |
| 266 | if 'Chromecast' in api.vars.builder_cfg.get('os', ''): |
| 267 | # Due to limited disk space, run a watered down perf run on Chromecast. |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 268 | args = [target] |
Kevin Lubick | b6d09b7 | 2017-06-15 15:21:17 -0400 | [diff] [blame] | 269 | if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 270 | args.extend(['--nogpu', '--config', '8888']) |
Kevin Lubick | b6d09b7 | 2017-06-15 15:21:17 -0400 | [diff] [blame] | 271 | elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 272 | args.extend(['--nocpu', '--config', 'gles']) |
Kevin Lubick | b6d09b7 | 2017-06-15 15:21:17 -0400 | [diff] [blame] | 273 | args.extend([ |
Kevin Lubick | ffce079 | 2017-05-24 15:30:35 -0400 | [diff] [blame] | 274 | '-i', api.flavor.device_dirs.resource_dir, |
| 275 | '--images', api.flavor.device_path_join( |
| 276 | api.flavor.device_dirs.resource_dir, 'color_wheel.jpg'), |
Kevin Lubick | c78a2d7 | 2017-06-01 15:51:06 -0400 | [diff] [blame] | 277 | '--skps', api.flavor.device_dirs.skp_dir, |
Kevin Lubick | ffce079 | 2017-05-24 15:30:35 -0400 | [diff] [blame] | 278 | '--pre_log', |
| 279 | '--match', # skia:6581 |
| 280 | '~matrixconvolution', |
| 281 | '~blur_image_filter', |
| 282 | '~blur_0.01', |
| 283 | '~GM_animated-image-blurs', |
Brian Salomon | 44acb5b | 2017-07-18 19:59:24 -0400 | [diff] [blame] | 284 | '~blendmode_mask_', |
Kevin Lubick | b6d09b7 | 2017-06-15 15:21:17 -0400 | [diff] [blame] | 285 | ]) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 286 | |
| 287 | if api.vars.upload_perf_results: |
| 288 | now = api.time.utcnow() |
| 289 | ts = int(calendar.timegm(now.utctimetuple())) |
| 290 | json_path = api.flavor.device_path_join( |
| 291 | api.flavor.device_dirs.perf_data_dir, |
| 292 | 'nanobench_%s_%d.json' % (api.vars.got_revision, ts)) |
| 293 | args.extend(['--outResultsFile', json_path]) |
| 294 | args.extend(properties) |
| 295 | |
| 296 | keys_blacklist = ['configuration', 'role', 'is_trybot'] |
| 297 | args.append('--key') |
| 298 | for k in sorted(api.vars.builder_cfg.keys()): |
| 299 | if not k in keys_blacklist: |
| 300 | args.extend([k, api.vars.builder_cfg[k]]) |
| 301 | |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 302 | # See skia:2789. |
Ben Wagner | 988d15e | 2017-04-27 13:08:50 -0400 | [diff] [blame] | 303 | extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_') |
| 304 | if 'AbandonGpuContext' in extra_config_parts: |
Ben Wagner | 32fa510 | 2017-08-10 21:25:55 -0400 | [diff] [blame] | 305 | args.extend(['--abandonGpuContext']) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 306 | |
Ben Wagner | 5655ba4 | 2017-10-02 10:48:32 -0400 | [diff] [blame] | 307 | api.run(api.flavor.step, target, cmd=args, |
| 308 | abort_on_failure=False) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 309 | |
| 310 | # Copy results to swarming out dir. |
| 311 | if api.vars.upload_perf_results: |
Kevin Lubick | 587afc9 | 2017-10-12 12:21:47 -0400 | [diff] [blame^] | 312 | api.file.ensure_directory('makedirs perf_dir', |
| 313 | api.path.dirname(api.vars.perf_data_dir)) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 314 | api.flavor.copy_directory_contents_to_host( |
| 315 | api.flavor.device_dirs.perf_data_dir, |
| 316 | api.vars.perf_data_dir) |
| 317 | |
| 318 | |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 319 | def RunSteps(api): |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 320 | api.core.setup() |
Eric Boren | 896af75 | 2017-04-24 13:22:56 -0400 | [diff] [blame] | 321 | env = {} |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 322 | if 'iOS' in api.vars.builder_name: |
| 323 | env['IOS_BUNDLE_ID'] = 'com.google.nanobench' |
Stephan Altmueller | 63e843d | 2017-04-25 11:38:38 -0400 | [diff] [blame] | 324 | env['IOS_MOUNT_POINT'] = api.vars.slave_dir.join('mnt_iosdevice') |
Eric Boren | 896af75 | 2017-04-24 13:22:56 -0400 | [diff] [blame] | 325 | with api.env(env): |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 326 | try: |
| 327 | if 'Chromecast' in api.vars.builder_name: |
| 328 | api.flavor.install(resources=True, skps=True) |
| 329 | else: |
| 330 | api.flavor.install_everything() |
| 331 | perf_steps(api) |
| 332 | finally: |
| 333 | api.flavor.cleanup_steps() |
| 334 | api.run.check_failure() |
| 335 | |
| 336 | |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 337 | TEST_BUILDERS = [ |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 338 | 'Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug-Android_Vulkan', |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 339 | 'Perf-Android-Clang-Nexus10-CPU-Exynos5250-arm-Release-Android', |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 340 | 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-Android', |
| 341 | 'Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-Android', |
| 342 | 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android', |
| 343 | 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-Android_Vulkan', |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 344 | 'Perf-Android-Clang-PixelC-GPU-TegraX1-arm64-Release-Android_Skpbench', |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 345 | 'Perf-ChromeOS-Clang-Chromebook_C100p-GPU-MaliT764-arm-Release', |
Kevin Lubick | b6d09b7 | 2017-06-15 15:21:17 -0400 | [diff] [blame] | 346 | 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug', |
Kevin Lubick | c78a2d7 | 2017-06-01 15:51:06 -0400 | [diff] [blame] | 347 | 'Perf-Chromecast-GCC-Chorizo-GPU-Cortex_A7-arm-Release', |
Ben Wagner | adf17dc | 2017-09-12 23:41:00 -0400 | [diff] [blame] | 348 | 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-UBSAN_float_cast_overflow', |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 349 | 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release', |
Ben Wagner | cc4221b | 2017-08-17 17:29:04 -0400 | [diff] [blame] | 350 | 'Perf-Mac-Clang-MacMini7.1-CPU-AVX-x86_64-Release', |
Ben Wagner | 135db05 | 2017-09-28 21:20:25 -0400 | [diff] [blame] | 351 | 'Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Release', |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 352 | 'Perf-Mac-Clang-MacMini7.1-GPU-IntelIris5100-x86_64-Release-CommandBuffer', |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 353 | 'Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-Vulkan', |
| 354 | 'Perf-Ubuntu16-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release', |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 355 | ('Perf-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release' |
| 356 | '-Valgrind_AbandonGpuContext_SK_CPU_LIMIT_SSE41'), |
| 357 | ('Perf-Ubuntu17-GCC-Golo-GPU-QuadroP400-x86_64-Release' |
| 358 | '-Valgrind_SK_CPU_LIMIT_SSE41'), |
Ben Wagner | a317a99 | 2017-10-11 00:23:58 -0400 | [diff] [blame] | 359 | 'Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-Vulkan', |
Brian Osman | 6a1a5f7 | 2017-04-21 15:38:27 -0400 | [diff] [blame] | 360 | 'Perf-Win10-MSVC-AlphaR2-GPU-RadeonR9M470X-x86_64-Release-ANGLE', |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 361 | 'Perf-Win10-MSVC-NUC6i5SYK-GPU-IntelIris540-x86_64-Release-ANGLE', |
Ben Wagner | 38a5601 | 2017-04-28 17:13:32 -0400 | [diff] [blame] | 362 | 'Perf-Win10-MSVC-ShuttleC-GPU-GTX960-x86_64-Release-ANGLE', |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 363 | 'Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Debug', |
| 364 | 'Perf-Win2k8-MSVC-GCE-CPU-AVX2-x86_64-Release', |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 365 | 'Perf-iOS-Clang-iPadPro-GPU-GT7800-arm64-Release', |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 366 | ] |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 367 | |
| 368 | |
| 369 | def GenTests(api): |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 370 | for builder in TEST_BUILDERS: |
| 371 | test = ( |
| 372 | api.test(builder) + |
| 373 | api.properties(buildername=builder, |
| 374 | revision='abc123', |
| 375 | path_config='kitchen', |
| 376 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 377 | api.path.exists( |
| 378 | api.path['start_dir'].join('skia'), |
| 379 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 380 | 'skimage', 'VERSION'), |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 381 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 382 | 'skp', 'VERSION'), |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 383 | api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') |
Ben Wagner | f835c22 | 2017-04-30 11:14:51 -0400 | [diff] [blame] | 384 | ) + |
| 385 | api.step_data('get swarming bot id', |
| 386 | stdout=api.raw_io.output('skia-bot-123')) + |
| 387 | api.step_data('get swarming task id', |
| 388 | stdout=api.raw_io.output('123456')) |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 389 | ) |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 390 | if 'Win' in builder: |
| 391 | test += api.platform('win', 64) |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 392 | |
Eric Boren | f9aa9e5 | 2017-04-10 09:56:10 -0400 | [diff] [blame] | 393 | if 'Chromecast' in builder: |
| 394 | test += api.step_data( |
| 395 | 'read chromecast ip', |
| 396 | stdout=api.raw_io.output('192.168.1.2:5555')) |
| 397 | |
| 398 | if 'ChromeOS' in builder: |
| 399 | test += api.step_data( |
| 400 | 'read chromeos ip', |
| 401 | stdout=api.raw_io.output('{"user_ip":"foo@127.0.0.1"}')) |
| 402 | |
| 403 | yield test |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 404 | |
Ben Wagner | 7cf2fd6 | 2017-10-09 14:27:26 -0400 | [diff] [blame] | 405 | builder = 'Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Release' |
Kevin Lubick | fe079d4 | 2017-04-12 08:31:48 -0400 | [diff] [blame] | 406 | yield ( |
| 407 | api.test('trybot') + |
| 408 | api.properties(buildername=builder, |
| 409 | revision='abc123', |
| 410 | path_config='kitchen', |
| 411 | swarm_out_dir='[SWARM_OUT_DIR]') + |
| 412 | api.properties(patch_storage='gerrit') + |
| 413 | api.properties.tryserver( |
| 414 | buildername=builder, |
| 415 | gerrit_project='skia', |
| 416 | gerrit_url='https://skia-review.googlesource.com/', |
| 417 | )+ |
| 418 | api.path.exists( |
| 419 | api.path['start_dir'].join('skia'), |
| 420 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
| 421 | 'skimage', 'VERSION'), |
| 422 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
| 423 | 'skp', 'VERSION'), |
| 424 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
| 425 | 'svg', 'VERSION'), |
| 426 | api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') |
| 427 | ) |
| 428 | ) |
| 429 | |
Ben Wagner | 6e0a6b3 | 2017-09-26 14:11:15 -0400 | [diff] [blame] | 430 | builder = 'Perf-Android-Clang-NexusPlayer-CPU-Moorefield-x86-Debug-Android' |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 431 | yield ( |
| 432 | api.test('failed_push') + |
| 433 | api.properties(buildername=builder, |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 434 | revision='abc123', |
| 435 | path_config='kitchen', |
Eric Boren | 5de544b | 2017-01-12 08:46:20 -0500 | [diff] [blame] | 436 | swarm_out_dir='[SWARM_OUT_DIR]') + |
borenet | 1ed2ae4 | 2016-07-26 11:52:17 -0700 | [diff] [blame] | 437 | api.path.exists( |
Ravi Mistry | 9bcca6a | 2016-11-21 16:06:19 -0500 | [diff] [blame] | 438 | api.path['start_dir'].join('skia'), |
| 439 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 440 | 'skimage', 'VERSION'), |
Ravi Mistry | 9bcca6a | 2016-11-21 16:06:19 -0500 | [diff] [blame] | 441 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 442 | 'skp', 'VERSION'), |
| 443 | api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |
| 444 | 'svg', 'VERSION'), |
Ravi Mistry | 9bcca6a | 2016-11-21 16:06:19 -0500 | [diff] [blame] | 445 | api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') |
Eric Boren | 4c7754c | 2017-04-10 08:19:10 -0400 | [diff] [blame] | 446 | ) + |
| 447 | api.step_data('push [START_DIR]/skia/resources/* '+ |
| 448 | '/sdcard/revenge_of_the_skiabot/resources', retcode=1) |
borenet | bfa5b45 | 2016-10-19 10:13:32 -0700 | [diff] [blame] | 449 | ) |