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