OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 """Recipe for the Skia RecreateSKPs Bot.""" | 6 """Recipe for the Skia RecreateSKPs Bot.""" |
7 | 7 |
8 | 8 |
9 DEPS = [ | 9 DEPS = [ |
10 'build/file', | 10 'build/file', |
11 'core', | 11 'core', |
12 'depot_tools/gclient', | 12 'depot_tools/gclient', |
| 13 'infra', |
13 'recipe_engine/path', | 14 'recipe_engine/path', |
14 'recipe_engine/properties', | 15 'recipe_engine/properties', |
15 'recipe_engine/python', | 16 'recipe_engine/python', |
16 'recipe_engine/raw_io', | 17 'recipe_engine/raw_io', |
17 'recipe_engine/step', | 18 'recipe_engine/step', |
18 'vars', | 19 'vars', |
19 ] | 20 ] |
20 | 21 |
21 | 22 |
22 TEST_BUILDERS = { | 23 TEST_BUILDERS = { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 '--target_dir', output_dir] | 130 '--target_dir', output_dir] |
130 if 'Canary' not in api.properties['buildername']: | 131 if 'Canary' not in api.properties['buildername']: |
131 cmd.append('--upload_to_partner_bucket') | 132 cmd.append('--upload_to_partner_bucket') |
132 api.step('Recreate SKPs', | 133 api.step('Recreate SKPs', |
133 cmd=cmd, | 134 cmd=cmd, |
134 cwd=api.vars.skia_dir, | 135 cwd=api.vars.skia_dir, |
135 env=env) | 136 env=env) |
136 | 137 |
137 # Upload the SKPs. | 138 # Upload the SKPs. |
138 if 'Canary' not in api.properties['buildername']: | 139 if 'Canary' not in api.properties['buildername']: |
| 140 api.infra.update_go_deps() |
139 cmd = ['python', | 141 cmd = ['python', |
140 api.vars.skia_dir.join('infra', 'bots', 'upload_skps.py'), | 142 api.vars.skia_dir.join('infra', 'bots', 'upload_skps.py'), |
141 '--target_dir', output_dir] | 143 '--target_dir', output_dir] |
| 144 env.update(api.infra.go_env) |
142 with depot_tools_auth(api, UPDATE_SKPS_KEY): | 145 with depot_tools_auth(api, UPDATE_SKPS_KEY): |
143 api.step('Upload SKPs', | 146 api.step('Upload SKPs', |
144 cmd=cmd, | 147 cmd=cmd, |
145 cwd=api.vars.skia_dir, | 148 cwd=api.vars.skia_dir, |
146 env=env) | 149 env=env) |
147 | 150 |
148 | 151 |
149 def GenTests(api): | 152 def GenTests(api): |
150 for mastername, slaves in TEST_BUILDERS.iteritems(): | 153 for mastername, slaves in TEST_BUILDERS.iteritems(): |
151 for slavename, builders_by_slave in slaves.iteritems(): | 154 for slavename, builders_by_slave in slaves.iteritems(): |
152 for builder in builders_by_slave: | 155 for builder in builders_by_slave: |
153 test = ( | 156 test = ( |
154 api.test(builder) + | 157 api.test(builder) + |
155 api.properties(buildername=builder, | 158 api.properties(buildername=builder, |
156 mastername=mastername, | 159 mastername=mastername, |
157 slavename=slavename, | 160 slavename=slavename, |
158 revision='abc123', | 161 revision='abc123', |
159 buildnumber=2, | 162 buildnumber=2, |
160 path_config='kitchen', | 163 path_config='kitchen', |
161 swarm_out_dir='[SWARM_OUT_DIR]') + | 164 swarm_out_dir='[SWARM_OUT_DIR]') + |
162 api.path.exists(api.path['slave_build'].join('skp_output')) | 165 api.path.exists(api.path['slave_build'].join('skp_output')) |
163 ) | 166 ) |
164 yield test | 167 yield test |
OLD | NEW |