OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 from common.skia import global_constants | 5 from common.skia import global_constants |
6 | 6 |
7 | 7 |
8 DEPS = [ | 8 DEPS = [ |
9 'ct', | 9 'ct', |
10 'file', | 10 'file', |
11 'depot_tools/gclient', | 11 'depot_tools/gclient', |
12 'depot_tools/infra_paths', | |
13 'gsutil', | 12 'gsutil', |
14 'recipe_engine/path', | 13 'recipe_engine/path', |
15 'recipe_engine/properties', | 14 'recipe_engine/properties', |
16 'recipe_engine/step', | 15 'recipe_engine/step', |
17 'recipe_engine/time', | 16 'recipe_engine/time', |
18 'skia', | 17 'skia', |
19 'skia_swarming', | 18 'skia_swarming', |
20 'swarming', | 19 'swarming', |
21 'swarming_client', | 20 'swarming_client', |
22 'depot_tools/tryserver', | 21 'depot_tools/tryserver', |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 | 94 |
96 # Checkout Swarming scripts. | 95 # Checkout Swarming scripts. |
97 # Explicitly set revision to empty string to checkout swarming ToT. If this is | 96 # Explicitly set revision to empty string to checkout swarming ToT. If this is |
98 # not done then it crashes due to missing | 97 # not done then it crashes due to missing |
99 # api.properties['parent_got_swarming_client_revision'] which seems to be | 98 # api.properties['parent_got_swarming_client_revision'] which seems to be |
100 # set only for Chromium bots. | 99 # set only for Chromium bots. |
101 api.swarming_client.checkout(revision='') | 100 api.swarming_client.checkout(revision='') |
102 # Ensure swarming_client is compatible with what recipes expect. | 101 # Ensure swarming_client is compatible with what recipes expect. |
103 api.swarming.check_client_version() | 102 api.swarming.check_client_version() |
104 # Setup Go isolate binary. | 103 # Setup Go isolate binary. |
105 chromium_checkout = api.infra_paths['slave_build'].join('src') | 104 chromium_checkout = api.path['slave_build'].join('src') |
106 api.skia_swarming.setup_go_isolate(chromium_checkout.join('tools', 'luci-go')) | 105 api.skia_swarming.setup_go_isolate(chromium_checkout.join('tools', 'luci-go')) |
107 | 106 |
108 # Apply issue to the Skia checkout if this is a trybot run. | 107 # Apply issue to the Skia checkout if this is a trybot run. |
109 api.tryserver.maybe_apply_issue() | 108 api.tryserver.maybe_apply_issue() |
110 | 109 |
111 # Build the tool. | 110 # Build the tool. |
112 api.step('build %s' % skia_tool, | 111 api.step('build %s' % skia_tool, |
113 ['make', skia_tool, 'BUILDTYPE=%s' % configuration], | 112 ['make', skia_tool, 'BUILDTYPE=%s' % configuration], |
114 cwd=api.path['checkout']) | 113 cwd=api.path['checkout']) |
115 | 114 |
116 skps_chromium_build = api.properties.get( | 115 skps_chromium_build = api.properties.get( |
117 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD) | 116 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD) |
118 | 117 |
119 # Set build property to make finding SKPs convenient. | 118 # Set build property to make finding SKPs convenient. |
120 api.step.active_result.presentation.properties['Location of SKPs'] = ( | 119 api.step.active_result.presentation.properties['Location of SKPs'] = ( |
121 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % ( | 120 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % ( |
122 api.ct.CT_GS_BUCKET, ct_page_type, skps_chromium_build)) | 121 api.ct.CT_GS_BUCKET, ct_page_type, skps_chromium_build)) |
123 | 122 |
124 # Delete swarming_temp_dir to ensure it starts from a clean slate. | 123 # Delete swarming_temp_dir to ensure it starts from a clean slate. |
125 api.file.rmtree('swarming temp dir', api.skia_swarming.swarming_temp_dir) | 124 api.file.rmtree('swarming temp dir', api.skia_swarming.swarming_temp_dir) |
126 | 125 |
127 for slave_num in range(1, ct_num_slaves + 1): | 126 for slave_num in range(1, ct_num_slaves + 1): |
128 # Download SKPs. | 127 # Download SKPs. |
129 api.ct.download_skps( | 128 api.ct.download_skps( |
130 ct_page_type, slave_num, skps_chromium_build, | 129 ct_page_type, slave_num, skps_chromium_build, |
131 api.infra_paths['slave_build'].join('skps')) | 130 api.path['slave_build'].join('skps')) |
132 | 131 |
133 # Create this slave's isolated.gen.json file to use for batcharchiving. | 132 # Create this slave's isolated.gen.json file to use for batcharchiving. |
134 isolate_dir = chromium_checkout.join('chrome') | 133 isolate_dir = chromium_checkout.join('chrome') |
135 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE) | 134 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE) |
136 extra_variables = { | 135 extra_variables = { |
137 'SLAVE_NUM': str(slave_num), | 136 'SLAVE_NUM': str(slave_num), |
138 'TOOL_NAME': skia_tool, | 137 'TOOL_NAME': skia_tool, |
139 'GIT_HASH': skia_hash, | 138 'GIT_HASH': skia_hash, |
140 'CONFIGURATION': configuration, | 139 'CONFIGURATION': configuration, |
141 } | 140 } |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 ) | 210 ) |
212 | 211 |
213 yield( | 212 yield( |
214 api.test('CT_BENCH_10k_SKPs') + | 213 api.test('CT_BENCH_10k_SKPs') + |
215 api.properties( | 214 api.properties( |
216 buildername= | 215 buildername= |
217 'Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_10k_SKPs', | 216 'Perf-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_10k_SKPs', |
218 ct_num_slaves=ct_num_slaves, | 217 ct_num_slaves=ct_num_slaves, |
219 revision=skia_revision, | 218 revision=skia_revision, |
220 ) + | 219 ) + |
221 api.infra_paths.exists( | 220 api.path.exists( |
222 api.infra_paths['slave_build'].join('skia'), | 221 api.path['slave_build'].join('skia'), |
223 api.infra_paths['slave_build'].join('src') | 222 api.path['slave_build'].join('src') |
224 ) | 223 ) |
225 ) | 224 ) |
226 | 225 |
227 yield( | 226 yield( |
228 api.test('CT_DM_1m_SKPs') + | 227 api.test('CT_DM_1m_SKPs') + |
229 api.properties( | 228 api.properties( |
230 buildername='Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_1m_SKPs', | 229 buildername='Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_1m_SKPs', |
231 ct_num_slaves=ct_num_slaves, | 230 ct_num_slaves=ct_num_slaves, |
232 revision=skia_revision, | 231 revision=skia_revision, |
233 ) | 232 ) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 api.test('CT_DM_10k_SKPs_Trybot') + | 279 api.test('CT_DM_10k_SKPs_Trybot') + |
281 api.properties( | 280 api.properties( |
282 buildername= | 281 buildername= |
283 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot', | 282 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot', |
284 ct_num_slaves=ct_num_slaves, | 283 ct_num_slaves=ct_num_slaves, |
285 rietveld='codereview.chromium.org', | 284 rietveld='codereview.chromium.org', |
286 issue=1499623002, | 285 issue=1499623002, |
287 patchset=1, | 286 patchset=1, |
288 ) | 287 ) |
289 ) | 288 ) |
OLD | NEW |