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

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: Rebase. 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 _CreateShardTestSpec(name, perf_id, required_apks, num_device_shards,
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] = _CreateShardTestSpec(
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 _ChromiumPerfFYITesters():
89 testers = [
90 _CreateTestSpec('Android Nexus5 WebView Perf', 'android-webview',
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-webview-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': _ChromiumPerfFYITesters(),
81 }) 106 })
82 107
83 108
84 def RunSteps(api): 109 def RunSteps(api):
85 mastername = api.properties['mastername'] 110 mastername = api.properties['mastername']
86 buildername = api.properties['buildername'] 111 buildername = api.properties['buildername']
87 # TODO(akuegel): Move the configs in builders.py in chromium_tests to this 112 # TODO(akuegel): Move the configs in builders.py in chromium_tests to this
88 # recipe, and get rid of duplications. 113 # recipe, and get rid of duplications.
89 builder = dict(BUILDERS[mastername][buildername]) 114 builder = dict(BUILDERS[mastername][buildername])
90 builder_config = builder.get('recipe_config', 'base_config') 115 builder_config = builder.get('recipe_config', 'base_config')
(...skipping 26 matching lines...) Expand all
117 bot_update_step) 142 bot_update_step)
118 143
119 api.path['checkout'] = api.path['slave_build'].join('src') 144 api.path['checkout'] = api.path['slave_build'].join('src')
120 api.chromium_android.clean_local_files() 145 api.chromium_android.clean_local_files()
121 146
122 api.chromium_android.download_build(bucket=builder['bucket'], 147 api.chromium_android.download_build(bucket=builder['bucket'],
123 path=builder['path'](api)) 148 path=builder['path'](api))
124 149
125 api.chromium_android.common_tests_setup_steps(perf_setup=True) 150 api.chromium_android.common_tests_setup_steps(perf_setup=True)
126 151
127 api.chromium_android.adb_install_apk('ChromePublic.apk') 152 required_apks = builder.get('required_apks', [])
153 for apk in required_apks:
154 api.chromium_android.adb_install_apk(apk)
128 155
129 test_runner = api.chromium_tests.create_test_runner( 156 test_runner = api.chromium_tests.create_test_runner(
130 api, builder.get('tests', [])) 157 api, builder.get('tests', []))
131 158
132 try: 159 try:
133 failures = [] 160 failures = []
134 if test_runner: 161 if test_runner:
135 try: 162 try:
136 test_runner() 163 test_runner()
137 except api.step.StepFailure as f: 164 except api.step.StepFailure as f:
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 mastername='chromium.perf', 272 mastername='chromium.perf',
246 buildername='Android Nexus5 Perf (1)', 273 buildername='Android Nexus5 Perf (1)',
247 parent_buildername='parent_buildername', 274 parent_buildername='parent_buildername',
248 parent_buildnumber='1729', 275 parent_buildnumber='1729',
249 parent_revision='deadbeef', 276 parent_revision='deadbeef',
250 revision='deadbeef', 277 revision='deadbeef',
251 slavename='slavename', 278 slavename='slavename',
252 target='Release') + 279 target='Release') +
253 api.override_step_data( 280 api.override_step_data(
254 'perf_test.foo', retcode=87)) 281 'perf_test.foo', retcode=87))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698