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 5 6DEPS = [ 7 'checkout', 8 'recipe_engine/file', 9 'recipe_engine/path', 10 'recipe_engine/properties', 11 'run', 12 'vars', 13] 14 15 16def RunSteps(api): 17 api.vars.setup() 18 19 bot_update = True 20 if 'NoDEPS' in api.properties['buildername']: 21 bot_update = False 22 23 checkout_root = api.checkout.default_checkout_root 24 checkout_chromium = False 25 checkout_flutter = False 26 extra_gclient_env = {} 27 flutter_android = False 28 parent_rev = False 29 if 'CommandBuffer' in api.vars.builder_name: 30 checkout_chromium = True 31 if 'RecreateSKPs' in api.vars.builder_name: 32 checkout_chromium = True 33 extra_gclient_env['CPPFLAGS'] = ( 34 '-DSK_ALLOW_CROSSPROCESS_PICTUREIMAGEFILTERS=1') 35 if 'Flutter' in api.vars.builder_name: 36 checkout_root = checkout_root.join('flutter') 37 checkout_flutter = True 38 if 'Android' in api.vars.builder_name: 39 flutter_android = True 40 if 'ParentRevision' in api.vars.builder_name: 41 parent_rev = True 42 43 if bot_update: 44 api.checkout.bot_update( 45 checkout_root=checkout_root, 46 checkout_chromium=checkout_chromium, 47 checkout_flutter=checkout_flutter, 48 extra_gclient_env=extra_gclient_env, 49 flutter_android=flutter_android, 50 parent_rev=parent_rev) 51 else: 52 api.checkout.git(checkout_root=api.path['start_dir']) 53 api.file.ensure_directory('makedirs tmp_dir', api.vars.tmp_dir) 54 55 56TEST_BUILDERS = [ 57 'Build-Win-Clang-x86_64-Release-ParentRevision', 58 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 59 'Housekeeper-Weekly-RecreateSKPs', 60] 61 62 63def GenTests(api): 64 for buildername in TEST_BUILDERS: 65 yield ( 66 api.test(buildername) + 67 api.properties(buildername=buildername, 68 repository='https://skia.googlesource.com/skia.git', 69 revision='abc123', 70 path_config='kitchen', 71 swarm_out_dir='[SWARM_OUT_DIR]') 72 ) 73 74 buildername = 'Build-Win-Clang-x86_64-Release-ParentRevision' 75 yield ( 76 api.test('parent_revision_trybot') + 77 api.properties(buildername=buildername, 78 repository='https://skia.googlesource.com/skia.git', 79 revision='abc123', 80 path_config='kitchen', 81 swarm_out_dir='[SWARM_OUT_DIR]', 82 patch_issue=456789, 83 patch_set=12, 84 patch_ref='refs/changes/89/456789/12', 85 patch_repo='https://skia.googlesource.com/skia.git', 86 patch_storage='gerrit') 87 ) 88 89 buildername = 'Build-Debian9-Clang-arm-Release-Flutter_Android' 90 yield ( 91 api.test('flutter_trybot') + 92 api.properties( 93 repository='https://skia.googlesource.com/skia.git', 94 buildername=buildername, 95 path_config='kitchen', 96 swarm_out_dir='[SWARM_OUT_DIR]', 97 revision='abc123', 98 patch_issue=456789, 99 patch_set=12, 100 patch_ref='refs/changes/89/456789/12', 101 patch_repo='https://skia.googlesource.com/skia.git', 102 patch_storage='gerrit') + 103 api.path.exists( 104 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') 105 ) 106 ) 107 108 builder = 'Build-Debian9-Clang-x86_64-Release-NoDEPS' 109 yield ( 110 api.test(builder) + 111 api.properties(buildername=builder, 112 repository='https://skia.googlesource.com/skia.git', 113 revision='abc123', 114 path_config='kitchen', 115 swarm_out_dir='[SWARM_OUT_DIR]', 116 patch_issue=456789, 117 patch_set=12, 118 patch_ref='refs/changes/89/456789/12', 119 patch_repo='https://skia.googlesource.com/skia.git', 120 patch_storage='gerrit') + 121 api.path.exists(api.path['start_dir'].join('skp_output')) 122 ) 123 124 buildername = 'Build-Debian9-GCC-x86_64-Release' 125 yield ( 126 api.test('cross_repo_trybot') + 127 api.properties( 128 repository='https://skia.googlesource.com/parent_repo.git', 129 buildername=buildername, 130 path_config='kitchen', 131 swarm_out_dir='[SWARM_OUT_DIR]', 132 revision='abc123', 133 patch_issue=456789, 134 patch_set=12, 135 patch_ref='refs/changes/89/456789/12', 136 patch_repo='https://skia.googlesource.com/skia.git', 137 patch_storage='gerrit') + 138 api.path.exists( 139 api.path['start_dir'].join('tmp', 'uninteresting_hashes.txt') 140 ) 141 ) 142 yield ( 143 api.test('trybot') + 144 api.properties(buildername=buildername, 145 repository='https://skia.googlesource.com/skia.git', 146 revision='abc123', 147 path_config='kitchen', 148 patch_issue=456789, 149 patch_set=12, 150 patch_ref='refs/changes/89/456789/12', 151 patch_repo='https://skia.googlesource.com/skia.git', 152 patch_storage='gerrit', 153 swarm_out_dir='[SWARM_OUT_DIR]') 154 ) 155