Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: scripts/slave/recipes/skia/ct_skps.py

Issue 1689093004: [CT] Use zips of SKPs to speed up "isolate tests" in recipes (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@master
Patch Set: Retrain expectations Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/skia/ct_skps.expected/CT_BENCH_10k_SKPs.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_swarming', 9 'ct_swarming',
10 'file', 10 'file',
11 'depot_tools/gclient', 11 'depot_tools/gclient',
12 'gsutil', 12 'gsutil',
13 'recipe_engine/path', 13 'recipe_engine/path',
14 'recipe_engine/properties', 14 'recipe_engine/properties',
15 'recipe_engine/step', 15 'recipe_engine/step',
16 'recipe_engine/time', 16 'recipe_engine/time',
17 'swarming', 17 'swarming',
18 'swarming_client', 18 'swarming_client',
19 'depot_tools/tryserver', 19 'depot_tools/tryserver',
20 'zip',
20 ] 21 ]
21 22
22 23
23 CT_SKPS_ISOLATE = 'ct_skps.isolate' 24 CT_SKPS_ISOLATE = 'ct_skps.isolate'
24 25
25 # Do not batch archive more slaves than this value. This is used to prevent 26 # Do not batch archive more slaves than this value. This is used to prevent
26 # no output timeouts in the 'isolate tests' step. 27 # no output timeouts in the 'isolate tests' step.
27 MAX_SLAVES_TO_BATCHARCHIVE = 100 28 MAX_SLAVES_TO_BATCHARCHIVE = 100
28 29
29 # Number of slaves to shard CT runs to. 30 # Number of slaves to shard CT runs to.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 api.tryserver.maybe_apply_issue() 95 api.tryserver.maybe_apply_issue()
95 96
96 # Build the tool. 97 # Build the tool.
97 api.step('build %s' % skia_tool, 98 api.step('build %s' % skia_tool,
98 ['make', skia_tool, 'BUILDTYPE=%s' % configuration], 99 ['make', skia_tool, 'BUILDTYPE=%s' % configuration],
99 cwd=api.path['checkout']) 100 cwd=api.path['checkout'])
100 101
101 skps_chromium_build = api.properties.get( 102 skps_chromium_build = api.properties.get(
102 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD) 103 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD)
103 ct_num_slaves = api.properties.get('ct_num_slaves', DEFAULT_CT_NUM_SLAVES) 104 ct_num_slaves = api.properties.get('ct_num_slaves', DEFAULT_CT_NUM_SLAVES)
105 skps_dir = api.path['slave_build'].join('skps')
104 106
105 # Set build property to make finding SKPs convenient. 107 # Set build property to make finding SKPs convenient.
106 api.step.active_result.presentation.properties['Location of SKPs'] = ( 108 api.step.active_result.presentation.properties['Location of SKPs'] = (
107 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % ( 109 'https://pantheon.corp.google.com/storage/browser/%s/skps/%s/%s/' % (
108 api.ct_swarming.CT_GS_BUCKET, ct_page_type, skps_chromium_build)) 110 api.ct_swarming.CT_GS_BUCKET, ct_page_type, skps_chromium_build))
109 111
110 # Delete swarming_temp_dir to ensure it starts from a clean slate. 112 # Delete swarming_temp_dir to ensure it starts from a clean slate.
111 api.file.rmtree('swarming temp dir', api.ct_swarming.swarming_temp_dir) 113 api.file.rmtree('swarming temp dir', api.ct_swarming.swarming_temp_dir)
112 114
113 for slave_num in range(1, ct_num_slaves + 1): 115 for slave_num in range(1, ct_num_slaves + 1):
114 # Download SKPs. 116 # Download SKPs.
115 api.ct_swarming.download_skps( 117 api.ct_swarming.download_skps(
116 ct_page_type, slave_num, skps_chromium_build, 118 ct_page_type, slave_num, skps_chromium_build, skps_dir)
117 api.path['slave_build'].join('skps')) 119
120 # Zip up the SKPs due to https://github.com/luci/luci-go/issues/9
121 api.zip.directory(step_name='zip skps dir',
122 directory=skps_dir.join('slave%s' % slave_num),
123 output=skps_dir.join('slave%s.zip' % slave_num))
borenet 2016/02/11 20:11:55 I'm confused; what's the point of zipping the SKPs
rmistry 2016/02/11 20:42:53 It is used by the .isolate file in the CL referenc
118 124
119 # Create this slave's isolated.gen.json file to use for batcharchiving. 125 # Create this slave's isolated.gen.json file to use for batcharchiving.
120 isolate_dir = chromium_checkout.join('chrome') 126 isolate_dir = chromium_checkout.join('chrome')
121 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE) 127 isolate_path = isolate_dir.join(CT_SKPS_ISOLATE)
122 extra_variables = { 128 extra_variables = {
123 'SLAVE_NUM': str(slave_num), 129 'SLAVE_NUM': str(slave_num),
124 'TOOL_NAME': skia_tool, 130 'TOOL_NAME': skia_tool,
125 'GIT_HASH': skia_hash, 131 'GIT_HASH': skia_hash,
126 'CONFIGURATION': configuration, 132 'CONFIGURATION': configuration,
127 } 133 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 api.test('CT_DM_10k_SKPs_Trybot') + 266 api.test('CT_DM_10k_SKPs_Trybot') +
261 api.properties( 267 api.properties(
262 buildername= 268 buildername=
263 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot', 269 'Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-CT_DM_10k_SKPs-Trybot',
264 ct_num_slaves=ct_num_slaves, 270 ct_num_slaves=ct_num_slaves,
265 rietveld='codereview.chromium.org', 271 rietveld='codereview.chromium.org',
266 issue=1499623002, 272 issue=1499623002,
267 patchset=1, 273 patchset=1,
268 ) 274 )
269 ) 275 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/skia/ct_skps.expected/CT_BENCH_10k_SKPs.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698