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

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

Issue 1441173003: CT Skia recipe to run DM on the top 10k SKPs using swarming (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build@ct-swarming-perf
Patch Set: Rebase expectations due to step name change Created 5 years 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
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 from common.skia import global_constants
6
7
8 DEPS = [
9 'ct_swarming',
10 'file',
11 'gclient',
12 'path',
13 'properties',
14 'step',
15 'swarming',
16 'swarming_client',
17 ]
18
19
20 CT_PAGE_TYPE = '10k'
21 CT_DM_ISOLATE = 'ct_dm.isolate'
22
23 # Number of slaves to shard CT runs to.
24 DEFAULT_CT_NUM_SLAVES = 100
25
26 # The SKP repository to use.
27 DEFAULT_SKPS_CHROMIUM_BUILD = '310ea93-42bd6bf'
28
29
30 def RunSteps(api):
31 # Checkout Skia and Chromium.
32 gclient_cfg = api.gclient.make_config()
33 src = gclient_cfg.solutions.add()
34 src.name = 'src'
35 src.url = 'https://chromium.googlesource.com/chromium/src.git'
36 skia = gclient_cfg.solutions.add()
37 skia.name = 'skia'
38 skia.url = global_constants.SKIA_REPO
39 gclient_cfg.got_revision_mapping['skia'] = 'got_revision'
40 api.gclient.checkout(gclient_config=gclient_cfg)
41
42 # Checkout Swarming scripts.
43 api.swarming_client.checkout()
44 # Ensure swarming_client is compatible with what recipes expect.
45 api.swarming.check_client_version()
46
47 chromium_checkout = api.path['checkout']
48
49 # Build DM in Debug mode.
50 api.step('build dm', ['make', 'dm'], cwd=api.path['slave_build'].join('skia'))
51
52 # TODO(rmistry): Remove the following after crrev.com/1469823003 is submitted.
53 api.file.copy(
54 'copy %s' % CT_DM_ISOLATE,
55 '/repos/chromium/src/chrome/%s' % CT_DM_ISOLATE,
56 chromium_checkout.join('chrome', CT_DM_ISOLATE))
57 for f in ['run_ct_dm.py']:
58 api.file.copy(
59 'copy %s' % f,
60 '/repos/chromium/src/content/test/ct/%s' % f,
61 chromium_checkout.join('content', 'test', 'ct', f))
62
63 skps_chromium_build = api.properties.get(
64 'skps_chromium_build', DEFAULT_SKPS_CHROMIUM_BUILD)
65 ct_num_slaves = api.properties.get('ct_num_slaves', DEFAULT_CT_NUM_SLAVES)
66
67 for slave_num in range(1, ct_num_slaves + 1):
68 # Download SKPs.
69 api.ct_swarming.download_skps(CT_PAGE_TYPE, slave_num, skps_chromium_build)
70
71 # Create this slave's isolated.gen.json file to use for batcharchiving.
72 isolate_dir = chromium_checkout.join('chrome')
73 isolate_path = isolate_dir.join(CT_DM_ISOLATE)
74 extra_variables = {
75 'SLAVE_NUM': str(slave_num),
76 }
77 api.ct_swarming.create_isolated_gen_json(
78 isolate_path, isolate_dir, 'linux', slave_num, extra_variables)
79
80 # Batcharchive everything on the isolate server for efficiency.
81 api.ct_swarming.batcharchive(ct_num_slaves)
82 swarm_hashes = (
83 api.step.active_result.presentation.properties['swarm_hashes']).values()
84
85 # Trigger all swarming tasks.
86 tasks = api.ct_swarming.trigger_swarming_tasks(
87 swarm_hashes, task_name_prefix='ct-10k-dm',
88 dimensions={'os': 'Ubuntu', 'gpu': '10de'})
89
90 # Now collect all tasks.
91 api.ct_swarming.collect_swarming_tasks(tasks)
92
93
94 def GenTests(api):
95 parent_got_swarming_client_revision = '12345'
96 ct_num_slaves = 5
97
98 yield(
99 api.test('CT_DM_10k_SKPs') +
100 api.properties(
101 buildername='CT-DM-10k-SKPs',
102 parent_got_swarming_client_revision=parent_got_swarming_client_revision,
103 ct_num_slaves=ct_num_slaves,
104 )
105 )
106
107 yield(
108 api.test('CT_DM_10k_SKPs_slave3_failure') +
109 api.step_data('ct-10k-dm-3 on Ubuntu', retcode=1) +
110 api.properties(
111 buildername='CT-DM-10k-SKPs',
112 parent_got_swarming_client_revision=parent_got_swarming_client_revision,
113 ct_num_slaves=ct_num_slaves,
114 )
115 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698