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

Side by Side Diff: scripts/slave/recipes/android/perf.py

Issue 1777863005: Recipe changes to move webview perf bots to the android/perf recipe (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 4 years, 8 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 | Annotate | Revision Log
OLDNEW
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 from recipe_engine.types import freeze 5 from recipe_engine.types import freeze
6 6
7 7
8 DEPS = [ 8 DEPS = [
9 'adb', 9 'adb',
10 'depot_tools/bot_update',
11 'chromium', 10 'chromium',
12 'chromium_android', 11 'chromium_android',
13 'chromium_tests', 12 'chromium_tests',
13 'depot_tools/bot_update',
14 'depot_tools/gclient', 14 'depot_tools/gclient',
15 'recipe_engine/json', 15 'recipe_engine/json',
16 'recipe_engine/path', 16 'recipe_engine/path',
17 'recipe_engine/properties', 17 'recipe_engine/properties',
18 'recipe_engine/python', 18 'recipe_engine/python',
19 'recipe_engine/step', 19 'recipe_engine/step',
20 'test_utils', 20 'test_utils',
21 ] 21 ]
22 22
23 23
24 REPO_URL = 'https://chromium.googlesource.com/chromium/src.git' 24 REPO_URL = 'https://chromium.googlesource.com/chromium/src.git'
25 25
26 26 def _CreateTestSpec(name, perf_id, required_apks, num_device_shards=1,
27 def _ChromiumPerfTesters(): 27 num_host_shards=1, target_bits=64,
28 def _AddTestSpec(name, perf_id, num_device_shards=1, num_host_shards=1, 28 known_devices_file='.known_devices'):
29 target_bits=64, known_devices_file='.known_devices'): 29 def create_shard_test_spec(name, perf_id, required_apks, num_device_shards,
dtu 2016/04/14 19:24:24 _CreateShardTestSpec (Chromium style)
mikecase (-- gone --) 2016/04/15 21:23:17 Done
30 for shard_index in xrange(num_host_shards): 30 num_host_shards, shard_index, target_bits, known_devices_file):
31 builder_name = '%s (%d)' % (name, shard_index + 1)
32 testers[builder_name] = _TestSpec(
33 name, perf_id, num_device_shards, num_host_shards, shard_index,
34 target_bits, known_devices_file)
35
36 def _TestSpec(name, perf_id, num_device_shards, num_host_shards, shard_index,
37 target_bits, known_devices_file):
38 spec = { 31 spec = {
39 'perf_id': perf_id, 32 'perf_id': perf_id,
33 'required_apks': required_apks,
40 'bucket': 'chrome-perf', 34 'bucket': 'chrome-perf',
41 'num_device_shards': num_device_shards, 35 'num_device_shards': num_device_shards,
42 'num_host_shards': num_host_shards, 36 'num_host_shards': num_host_shards,
43 'shard_index': shard_index, 37 'shard_index': shard_index,
44 'test_spec_file': 'chromium.perf.json', 38 'test_spec_file': 'chromium.perf.json',
45 'max_battery_temp': 350, 39 'max_battery_temp': 350,
46 'known_devices_file': known_devices_file, 40 'known_devices_file': known_devices_file,
47 } 41 }
48
49 if target_bits == 32: 42 if target_bits == 32:
50 builder_name = 'android_perf_rel' 43 builder_name = 'android_perf_rel'
51 elif target_bits == 64: 44 elif target_bits == 64:
52 builder_name = 'android_perf_rel_arm64' 45 builder_name = 'android_perf_rel_arm64'
53 spec['recipe_config'] = 'tests_arm64' 46 spec['recipe_config'] = 'tests_arm64'
54 spec['path'] = lambda api: '%s/full-build-linux_%s.zip' % ( 47 spec['path'] = lambda api: '%s/full-build-linux_%s.zip' % (
55 builder_name, api.properties['parent_revision']) 48 builder_name, api.properties['parent_revision'])
56
57 return spec 49 return spec
58 50
59 testers = {} 51 tester_spec = {}
52 for shard_index in xrange(num_host_shards):
53 builder_name = '%s (%d)' % (name, shard_index + 1)
54 tester_spec[builder_name] = create_shard_test_spec(
55 name, perf_id, required_apks, num_device_shards, num_host_shards,
56 shard_index, target_bits, known_devices_file)
57 return tester_spec
60 58
61 _AddTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5', 59 def _ChromiumPerfTesters():
62 num_device_shards=7, num_host_shards=3, target_bits=32) 60 testers = [
63 _AddTestSpec('Android Nexus5 Perf', 'android-nexus5', 61 _CreateTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5',
64 num_device_shards=7, num_host_shards=3, target_bits=32) 62 required_apks=['ChromePublic.apk'], num_device_shards=7,
65 _AddTestSpec('Android Nexus5X Perf', 'android-nexus5X', 63 num_host_shards=3, target_bits=32),
66 num_device_shards=7, num_host_shards=3) 64 _CreateTestSpec('Android Nexus5 Perf', 'android-nexus5',
67 _AddTestSpec('Android Nexus6 Perf', 'android-nexus6', 65 required_apks=['ChromePublic.apk'], num_device_shards=7,
68 num_device_shards=7, num_host_shards=3, target_bits=32) 66 num_host_shards=3, target_bits=32),
69 _AddTestSpec('Android Nexus7v2 Perf', 'android-nexus7v2', 67 _CreateTestSpec('Android Nexus5X Perf', 'android-nexus5X',
70 num_device_shards=7, num_host_shards=3, target_bits=32) 68 required_apks=['ChromePublic.apk'], num_device_shards=7,
71 _AddTestSpec('Android Nexus9 Perf', 'android-nexus9', 69 num_host_shards=3),
72 num_device_shards=7, num_host_shards=3) 70 _CreateTestSpec('Android Nexus6 Perf', 'android-nexus6',
73 _AddTestSpec('Android One Perf', 'android-one', 71 required_apks=['ChromePublic.apk'], num_device_shards=7,
74 num_device_shards=7, num_host_shards=3, target_bits=32) 72 num_host_shards=3, target_bits=32),
73 _CreateTestSpec('Android Nexus7v2 Perf', 'android-nexus7v2',
74 required_apks=['ChromePublic.apk'], num_device_shards=7,
75 num_host_shards=3, target_bits=32),
76 _CreateTestSpec('Android Nexus9 Perf', 'android-nexus9',
77 required_apks=['ChromePublic.apk'], num_device_shards=7,
78 num_host_shards=3),
79 _CreateTestSpec('Android One Perf', 'android-one',
80 required_apks=['ChromePublic.apk'], num_device_shards=7,
81 num_host_shards=3, target_bits=32),
82 ]
83 master_spec = {}
84 for spec in testers:
85 master_spec.update(spec)
86 return master_spec
75 87
76 return testers 88 def _ChromiumFYIPerfTesters():
dtu 2016/04/14 19:24:24 _ChromiumPerfFYITesters
mikecase (-- gone --) 2016/04/15 21:23:17 Done
89 testers = [
90 _CreateTestSpec('Android Nexus5 WebView Perf', 'android-webivew',
dtu 2016/04/14 19:24:24 webview misspelled. below as well
mikecase (-- gone --) 2016/04/15 21:23:17 nice catch, ty
91 required_apks=['SystemWebview.apk', 'SystemWebViewShell.apk'],
92 num_device_shards=5, num_host_shards=1, target_bits=32),
93 _CreateTestSpec('Android Nexus5x WebView Perf', 'android-webivew-nexus5X',
94 required_apks=['SystemWebview.apk', 'SystemWebViewShell.apk'],
95 num_device_shards=7, num_host_shards=2, target_bits=32),
96 ]
97 master_spec = {}
98 for spec in testers:
99 master_spec.update(spec)
100 return master_spec
77 101
78 102
79 BUILDERS = freeze({ 103 BUILDERS = freeze({
80 'chromium.perf': _ChromiumPerfTesters(), 104 'chromium.perf': _ChromiumPerfTesters(),
105 'chromium.perf.fyi': _ChromiumFYIPerfTesters(),
81 'client.v8.fyi': { 106 'client.v8.fyi': {
82 'Android Nexus4 Perf': { 107 'Android Nexus4 Perf': {
83 'gclient_apply_config': [ 108 'gclient_apply_config': [
84 'v8_bleeding_edge_git', 109 'v8_bleeding_edge_git',
85 'chromium_lkcr', 110 'chromium_lkcr',
86 'show_v8_revision', 111 'show_v8_revision',
87 ], 112 ],
88 'perf_id': 'v8-android-nexus4', 113 'perf_id': 'v8-android-nexus4',
114 'required_apks': ['ChromePublic.apk'],
89 'bucket': 'v8-android', 115 'bucket': 'v8-android',
90 'path': lambda api: ('v8_android_perf_rel/full-build-linux_%s.zip' % 116 'path': lambda api: ('v8_android_perf_rel/full-build-linux_%s.zip' %
91 api.properties['parent_revision']), 117 api.properties['parent_revision']),
92 'num_device_shards': 1, 118 'num_device_shards': 1,
93 'set_component_rev': {'name': 'src/v8', 'rev_str': '%s'}, 119 'set_component_rev': {'name': 'src/v8', 'rev_str': '%s'},
94 }, 120 },
95 }, 121 },
96 }) 122 })
97 123
98 124
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 bot_update_step) 174 bot_update_step)
149 175
150 api.path['checkout'] = api.path['slave_build'].join('src') 176 api.path['checkout'] = api.path['slave_build'].join('src')
151 api.chromium_android.clean_local_files() 177 api.chromium_android.clean_local_files()
152 178
153 api.chromium_android.download_build(bucket=builder['bucket'], 179 api.chromium_android.download_build(bucket=builder['bucket'],
154 path=builder['path'](api)) 180 path=builder['path'](api))
155 181
156 api.chromium_android.common_tests_setup_steps(perf_setup=True) 182 api.chromium_android.common_tests_setup_steps(perf_setup=True)
157 183
158 api.chromium_android.adb_install_apk('ChromePublic.apk') 184 required_apks = builder.get('required_apks', [])
185 for apk in required_apks:
186 api.chromium_android.adb_install_apk(apk)
159 187
160 test_runner = api.chromium_tests.create_test_runner( 188 test_runner = api.chromium_tests.create_test_runner(
161 api, builder.get('tests', [])) 189 api, builder.get('tests', []))
162 190
163 try: 191 try:
164 failures = [] 192 failures = []
165 if test_runner: 193 if test_runner:
166 try: 194 try:
167 test_runner() 195 test_runner()
168 except api.step.StepFailure as f: 196 except api.step.StepFailure as f:
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 mastername='chromium.perf', 304 mastername='chromium.perf',
277 buildername='Android Nexus5 Perf (1)', 305 buildername='Android Nexus5 Perf (1)',
278 parent_buildername='parent_buildername', 306 parent_buildername='parent_buildername',
279 parent_buildnumber='1729', 307 parent_buildnumber='1729',
280 parent_revision='deadbeef', 308 parent_revision='deadbeef',
281 revision='deadbeef', 309 revision='deadbeef',
282 slavename='slavename', 310 slavename='slavename',
283 target='Release') + 311 target='Release') +
284 api.override_step_data( 312 api.override_step_data(
285 'perf_test.foo', retcode=87)) 313 'perf_test.foo', retcode=87))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698