OLD | NEW |
(Empty) | |
| 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 = [ |
| 10 'recipe_engine/json', |
| 11 'recipe_engine/path', |
| 12 'recipe_engine/platform', |
| 13 'recipe_engine/properties', |
| 14 'recipe_engine/raw_io', |
| 15 'skia', |
| 16 ] |
| 17 |
| 18 |
| 19 TEST_BUILDERS = { |
| 20 'client.skia': { |
| 21 'skiabot-linux-swarm-000': [ |
| 22 'Test-Android-GCC-GalaxyS3-GPU-Mali400-Arm7-Debug', |
| 23 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug', |
| 24 'Test-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', |
| 25 'Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot', |
| 26 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug', |
| 27 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-MSAN', |
| 28 'Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
| 29 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot', |
| 30 ], |
| 31 }, |
| 32 } |
| 33 |
| 34 |
| 35 def RunSteps(api): |
| 36 api.skia.setup() |
| 37 api.skia.test_steps() |
| 38 api.skia.cleanup_steps() |
| 39 api.skia.check_failure() |
| 40 |
| 41 |
| 42 def GenTests(api): |
| 43 def AndroidTestData(builder, adb=None): |
| 44 test_data = ( |
| 45 api.step_data( |
| 46 'get EXTERNAL_STORAGE dir', |
| 47 stdout=api.raw_io.output('/storage/emulated/legacy')) + |
| 48 api.step_data( |
| 49 'read SKP_VERSION', |
| 50 stdout=api.raw_io.output('42')) + |
| 51 api.step_data( |
| 52 'read SK_IMAGE_VERSION', |
| 53 stdout=api.raw_io.output('42')) + |
| 54 api.step_data( |
| 55 'exists skia_dm', |
| 56 stdout=api.raw_io.output('')) |
| 57 ) |
| 58 if 'GalaxyS3' not in builder: |
| 59 test_data += api.step_data( |
| 60 'adb root', |
| 61 stdout=api.raw_io.output('restarting adbd as root')) |
| 62 if adb: |
| 63 test_data += api.step_data( |
| 64 'which adb', |
| 65 stdout=api.raw_io.output(adb)) |
| 66 else: |
| 67 test_data += api.step_data( |
| 68 'which adb', |
| 69 retcode=1) |
| 70 |
| 71 return test_data |
| 72 |
| 73 for mastername, slaves in TEST_BUILDERS.iteritems(): |
| 74 for slavename, builders_by_slave in slaves.iteritems(): |
| 75 for builder in builders_by_slave: |
| 76 test = ( |
| 77 api.test(builder) + |
| 78 api.properties(buildername=builder, |
| 79 mastername=mastername, |
| 80 slavename=slavename, |
| 81 buildnumber=5, |
| 82 revision='abc123', |
| 83 path_config='kitchen', |
| 84 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 85 api.path.exists( |
| 86 api.path['slave_build'].join('skia'), |
| 87 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 88 'skimage', 'VERSION'), |
| 89 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 90 'skp', 'VERSION'), |
| 91 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 92 ) |
| 93 ) |
| 94 if ('Android' in builder and |
| 95 ('Test' in builder or 'Perf' in builder) and |
| 96 not 'Appurify' in builder): |
| 97 test += AndroidTestData(builder) |
| 98 if 'Trybot' in builder: |
| 99 test += api.properties(issue=500, |
| 100 patchset=1, |
| 101 rietveld='https://codereview.chromium.org') |
| 102 if 'Win' in builder: |
| 103 test += api.platform('win', 64) |
| 104 |
| 105 |
| 106 yield test |
| 107 |
| 108 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' |
| 109 yield ( |
| 110 api.test('failed_dm') + |
| 111 api.properties(buildername=builder, |
| 112 mastername='client.skia', |
| 113 slavename='skiabot-linux-swarm-000', |
| 114 buildnumber=6, |
| 115 revision='abc123', |
| 116 path_config='kitchen', |
| 117 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 118 api.path.exists( |
| 119 api.path['slave_build'].join('skia'), |
| 120 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 121 'skimage', 'VERSION'), |
| 122 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 123 'skp', 'VERSION'), |
| 124 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 125 ) + |
| 126 api.step_data('dm', retcode=1) |
| 127 ) |
| 128 |
| 129 builder = 'Test-Android-GCC-Nexus7-GPU-Tegra3-Arm7-Debug' |
| 130 yield ( |
| 131 api.test('failed_get_hashes') + |
| 132 api.properties(buildername=builder, |
| 133 mastername='client.skia', |
| 134 slavename='skiabot-linux-swarm-000', |
| 135 buildnumber=6, |
| 136 revision='abc123', |
| 137 path_config='kitchen', |
| 138 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 139 api.path.exists( |
| 140 api.path['slave_build'].join('skia'), |
| 141 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 142 'skimage', 'VERSION'), |
| 143 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 144 'skp', 'VERSION'), |
| 145 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 146 ) + |
| 147 AndroidTestData(builder) + |
| 148 api.step_data('read SKP_VERSION', |
| 149 stdout=api.raw_io.output('42')) + |
| 150 api.step_data('read SK_IMAGE_VERSION', |
| 151 stdout=api.raw_io.output('42')) + |
| 152 api.step_data('get uninteresting hashes', retcode=1) |
| 153 ) |
| 154 |
| 155 yield ( |
| 156 api.test('download_and_push_skps') + |
| 157 api.properties(buildername=builder, |
| 158 mastername='client.skia', |
| 159 slavename='skiabot-linux-swarm-000', |
| 160 buildnumber=6, |
| 161 revision='abc123', |
| 162 path_config='kitchen', |
| 163 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 164 api.path.exists( |
| 165 api.path['slave_build'].join('skia'), |
| 166 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 167 'skimage', 'VERSION'), |
| 168 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 169 'skp', 'VERSION'), |
| 170 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 171 ) + |
| 172 AndroidTestData(builder) + |
| 173 api.step_data('read SKP_VERSION', |
| 174 stdout=api.raw_io.output('2')) + |
| 175 api.step_data('read SK_IMAGE_VERSION', |
| 176 stdout=api.raw_io.output('42')) + |
| 177 api.step_data( |
| 178 'exists skps', |
| 179 stdout=api.raw_io.output('')) |
| 180 ) |
| 181 |
| 182 yield ( |
| 183 api.test('missing_SKP_VERSION_device') + |
| 184 api.properties(buildername=builder, |
| 185 mastername='client.skia', |
| 186 slavename='skiabot-linux-swarm-000', |
| 187 buildnumber=6, |
| 188 revision='abc123', |
| 189 path_config='kitchen', |
| 190 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 191 api.path.exists( |
| 192 api.path['slave_build'].join('skia'), |
| 193 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 194 'skimage', 'VERSION'), |
| 195 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 196 'skp', 'VERSION'), |
| 197 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 198 ) + |
| 199 AndroidTestData(builder) + |
| 200 api.step_data('read SKP_VERSION', |
| 201 retcode=1) + |
| 202 api.step_data('read SK_IMAGE_VERSION', |
| 203 stdout=api.raw_io.output('42')) + |
| 204 api.step_data( |
| 205 'exists skps', |
| 206 stdout=api.raw_io.output('')) |
| 207 ) |
| 208 |
| 209 yield ( |
| 210 api.test('download_and_push_skimage') + |
| 211 api.properties(buildername=builder, |
| 212 mastername='client.skia', |
| 213 slavename='skiabot-linux-swarm-000', |
| 214 buildnumber=6, |
| 215 revision='abc123', |
| 216 path_config='kitchen', |
| 217 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 218 api.path.exists( |
| 219 api.path['slave_build'].join('skia'), |
| 220 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 221 'skimage', 'VERSION'), |
| 222 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 223 'skp', 'VERSION'), |
| 224 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 225 ) + |
| 226 AndroidTestData(builder) + |
| 227 api.step_data('read SKP_VERSION', |
| 228 stdout=api.raw_io.output('42')) + |
| 229 api.step_data('read SK_IMAGE_VERSION', |
| 230 stdout=api.raw_io.output('2')) + |
| 231 api.step_data( |
| 232 'exists skia_images', |
| 233 stdout=api.raw_io.output('')) |
| 234 ) |
| 235 |
| 236 yield ( |
| 237 api.test('missing_SK_IMAGE_VERSION_device') + |
| 238 api.properties(buildername=builder, |
| 239 mastername='client.skia', |
| 240 slavename='skiabot-linux-swarm-000', |
| 241 buildnumber=6, |
| 242 revision='abc123', |
| 243 path_config='kitchen', |
| 244 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 245 api.path.exists( |
| 246 api.path['slave_build'].join('skia'), |
| 247 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 248 'skimage', 'VERSION'), |
| 249 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 250 'skp', 'VERSION'), |
| 251 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 252 ) + |
| 253 AndroidTestData(builder) + |
| 254 api.step_data('read SKP_VERSION', |
| 255 stdout=api.raw_io.output('42')) + |
| 256 api.step_data('read SK_IMAGE_VERSION', |
| 257 retcode=1) + |
| 258 api.step_data( |
| 259 'exists skia_images', |
| 260 stdout=api.raw_io.output('')) |
| 261 ) |
| 262 |
| 263 yield ( |
| 264 api.test('adb_in_path') + |
| 265 api.properties(buildername=builder, |
| 266 mastername='client.skia', |
| 267 slavename='skiabot-linux-swarm-000', |
| 268 buildnumber=6, |
| 269 revision='abc123', |
| 270 path_config='kitchen', |
| 271 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 272 api.path.exists( |
| 273 api.path['slave_build'].join('skia'), |
| 274 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 275 'skimage', 'VERSION'), |
| 276 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 277 'skp', 'VERSION'), |
| 278 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 279 ) + |
| 280 AndroidTestData(builder, adb='/usr/bin/adb') + |
| 281 api.step_data('read SKP_VERSION', |
| 282 stdout=api.raw_io.output('42')) + |
| 283 api.step_data('read SK_IMAGE_VERSION', |
| 284 stdout=api.raw_io.output('42')) |
| 285 ) |
| 286 |
| 287 builder = 'Test-Win8-MSVC-ShuttleB-CPU-AVX2-x86_64-Release-Trybot' |
| 288 yield ( |
| 289 api.test('big_issue_number') + |
| 290 api.properties(buildername=builder, |
| 291 mastername='client.skia.compile', |
| 292 slavename='skiabot-linux-swarm-000', |
| 293 buildnumber=5, |
| 294 revision='abc123', |
| 295 path_config='kitchen', |
| 296 swarm_out_dir='[SWARM_OUT_DIR]', |
| 297 rietveld='https://codereview.chromium.org', |
| 298 patchset=1, |
| 299 issue=2147533002L) + |
| 300 api.path.exists( |
| 301 api.path['slave_build'].join('skia'), |
| 302 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 303 'skimage', 'VERSION'), |
| 304 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 305 'skp', 'VERSION'), |
| 306 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 307 ) + |
| 308 api.platform('win', 64) |
| 309 ) |
| 310 |
| 311 builder = 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug' |
| 312 yield ( |
| 313 api.test('legacy_skimage_version') + |
| 314 api.properties(buildername=builder, |
| 315 mastername='client.skia', |
| 316 slavename='skiabot-linux-swarm-000', |
| 317 buildnumber=6, |
| 318 revision='abc123', |
| 319 path_config='kitchen', |
| 320 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 321 api.path.exists( |
| 322 api.path['slave_build'].join('skia'), |
| 323 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 324 'skp', 'VERSION'), |
| 325 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 326 ) |
| 327 ) |
| 328 |
| 329 yield ( |
| 330 api.test('legacy_skp_version') + |
| 331 api.properties(buildername=builder, |
| 332 mastername='client.skia', |
| 333 slavename='skiabot-linux-swarm-000', |
| 334 buildnumber=6, |
| 335 revision='abc123', |
| 336 path_config='kitchen', |
| 337 swarm_out_dir='[SWARM_OUT_DIR]') + |
| 338 api.path.exists( |
| 339 api.path['slave_build'].join('skia'), |
| 340 api.path['slave_build'].join('skia', 'infra', 'bots', 'assets', |
| 341 'skimage', 'VERSION'), |
| 342 api.path['slave_build'].join('tmp', 'uninteresting_hashes.txt') |
| 343 ) |
| 344 ) |
OLD | NEW |