1# Copyright 2017 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 5PYTHON_VERSION_COMPATIBILITY = "PY3" 6 7DEPS = [ 8 'checkout', 9 'recipe_engine/file', 10 'recipe_engine/path', 11 'recipe_engine/platform', 12 'recipe_engine/properties', 13 'run', 14 'vars', 15] 16 17 18def RunSteps(api): 19 api.vars.setup() 20 21 bot_update = True 22 if 'NoDEPS' in api.properties['buildername']: 23 bot_update = False 24 25 checkout_root = api.checkout.default_checkout_root 26 27 if bot_update: 28 api.checkout.bot_update( 29 checkout_root=checkout_root) 30 else: 31 api.checkout.git(checkout_root=api.path.start_dir) 32 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir) 33 34 35def GenTests(api): 36 37 builder = 'Build-Debian10-Clang-x86_64-Release-NoDEPS' 38 yield ( 39 api.test(builder) + 40 api.properties(buildername=builder, 41 repository='https://skia.googlesource.com/skia.git', 42 revision='abc123', 43 path_config='kitchen', 44 swarm_out_dir='[SWARM_OUT_DIR]', 45 patch_issue=456789, 46 patch_set=12, 47 patch_ref='refs/changes/89/456789/12', 48 patch_repo='https://skia.googlesource.com/skia.git', 49 patch_storage='gerrit') + 50 api.path.exists(api.path.start_dir.joinpath('skp_output')) 51 ) 52 53 buildername = 'Build-Debian10-Clang-x86_64-Release' 54 yield ( 55 api.test('cross_repo_trybot') + 56 api.properties( 57 repository='https://skia.googlesource.com/parent_repo.git', 58 buildername=buildername, 59 path_config='kitchen', 60 swarm_out_dir='[SWARM_OUT_DIR]', 61 revision='abc123', 62 patch_issue=456789, 63 patch_set=12, 64 patch_ref='refs/changes/89/456789/12', 65 patch_repo='https://skia.googlesource.com/skia.git', 66 patch_storage='gerrit') 67 ) 68 yield ( 69 api.test('trybot') + 70 api.properties(buildername=buildername, 71 repository='https://skia.googlesource.com/skia.git', 72 revision='abc123', 73 path_config='kitchen', 74 patch_issue=456789, 75 patch_set=12, 76 patch_ref='refs/changes/89/456789/12', 77 patch_repo='https://skia.googlesource.com/skia.git', 78 patch_storage='gerrit', 79 swarm_out_dir='[SWARM_OUT_DIR]') 80 ) 81