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

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

Issue 2146783003: [Android] Add option to run perf tests in platform mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: johns nit Created 4 years, 5 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 | « scripts/slave/recipe_modules/chromium_tests/steps.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 'chromium', 10 'chromium',
11 'chromium_android', 11 'chromium_android',
12 'chromium_tests', 12 'chromium_tests',
13 'depot_tools/bot_update', 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 def _CreateTestSpec(name, perf_id, required_apks, num_device_shards=1, 26 def _CreateTestSpec(name, perf_id, required_apks, num_device_shards=1,
27 num_host_shards=1, target_bits=64, 27 num_host_shards=1, target_bits=64,
28 browser_name=None, remove_system_webview=False): 28 browser_name=None, remove_system_webview=False,
29 enable_platform_mode=False):
29 def _CreateShardTestSpec(name, perf_id, required_apks, num_device_shards, 30 def _CreateShardTestSpec(name, perf_id, required_apks, num_device_shards,
30 num_host_shards, shard_index, target_bits, 31 num_host_shards, shard_index, target_bits,
31 browser_name, remove_system_webview): 32 browser_name, remove_system_webview,
33 enable_platform_mode):
32 spec = { 34 spec = {
33 'perf_id': perf_id, 35 'perf_id': perf_id,
34 'required_apks': required_apks, 36 'required_apks': required_apks,
35 'bucket': 'chrome-perf', 37 'bucket': 'chrome-perf',
36 'num_device_shards': num_device_shards, 38 'num_device_shards': num_device_shards,
37 'num_host_shards': num_host_shards, 39 'num_host_shards': num_host_shards,
38 'shard_index': shard_index, 40 'shard_index': shard_index,
39 'test_spec_file': 'chromium.perf.json', 41 'test_spec_file': 'chromium.perf.json',
40 'max_battery_temp': 350, 42 'max_battery_temp': 350,
41 'known_devices_file': '.known_devices', 43 'known_devices_file': '.known_devices',
42 'browser_name': browser_name, 44 'browser_name': browser_name,
43 'remove_system_webview': remove_system_webview, 45 'remove_system_webview': remove_system_webview,
46 'enable_platform_mode': enable_platform_mode,
44 } 47 }
45 if target_bits == 32: 48 if target_bits == 32:
46 builder_name = 'android_perf_rel' 49 builder_name = 'android_perf_rel'
47 elif target_bits == 64: 50 elif target_bits == 64:
48 builder_name = 'android_perf_rel_arm64' 51 builder_name = 'android_perf_rel_arm64'
49 spec['recipe_config'] = 'tests_arm64' 52 spec['recipe_config'] = 'tests_arm64'
50 spec['path'] = lambda api: '%s/full-build-linux_%s.zip' % ( 53 spec['path'] = lambda api: '%s/full-build-linux_%s.zip' % (
51 builder_name, api.properties['parent_revision']) 54 builder_name, api.properties['parent_revision'])
52 return spec 55 return spec
53 56
54 tester_spec = {} 57 tester_spec = {}
55 for shard_index in xrange(num_host_shards): 58 for shard_index in xrange(num_host_shards):
56 builder_name = '%s (%d)' % (name, shard_index + 1) 59 builder_name = '%s (%d)' % (name, shard_index + 1)
57 tester_spec[builder_name] = _CreateShardTestSpec( 60 tester_spec[builder_name] = _CreateShardTestSpec(
58 name, perf_id, required_apks, num_device_shards, num_host_shards, 61 name, perf_id, required_apks, num_device_shards, num_host_shards,
59 shard_index, target_bits, browser_name, remove_system_webview) 62 shard_index, target_bits, browser_name, remove_system_webview,
63 enable_platform_mode)
60 return tester_spec 64 return tester_spec
61 65
62 def _ChromiumPerfTesters(): 66 def _ChromiumPerfTesters():
63 testers = [ 67 testers = [
64 _CreateTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5', 68 _CreateTestSpec('Android Galaxy S5 Perf', 'android-galaxy-s5',
65 required_apks=['ChromePublic.apk'], num_device_shards=7, 69 required_apks=['ChromePublic.apk'], num_device_shards=7,
66 num_host_shards=3, target_bits=32), 70 num_host_shards=3, target_bits=32),
67 _CreateTestSpec('Android Nexus5 Perf', 'android-nexus5', 71 _CreateTestSpec('Android Nexus5 Perf', 'android-nexus5',
68 required_apks=['ChromePublic.apk'], num_device_shards=7, 72 required_apks=['ChromePublic.apk'], num_device_shards=7,
69 num_host_shards=3, target_bits=32), 73 num_host_shards=3, target_bits=32),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 test_runner() 173 test_runner()
170 except api.step.StepFailure as f: 174 except api.step.StepFailure as f:
171 failures.append(f) 175 failures.append(f)
172 176
173 dynamic_perf_tests = api.chromium_tests.steps.DynamicPerfTests( 177 dynamic_perf_tests = api.chromium_tests.steps.DynamicPerfTests(
174 builder['perf_id'], 'android', None, 178 builder['perf_id'], 'android', None,
175 max_battery_temp=builder.get('max_battery_temp'), 179 max_battery_temp=builder.get('max_battery_temp'),
176 num_device_shards=builder['num_device_shards'], 180 num_device_shards=builder['num_device_shards'],
177 num_host_shards=builder.get('num_host_shards', 1), 181 num_host_shards=builder.get('num_host_shards', 1),
178 shard_index=builder.get('shard_index', 0), 182 shard_index=builder.get('shard_index', 0),
179 override_browser_name=builder.get('browser_name')) 183 override_browser_name=builder.get('browser_name'),
184 enable_platform_mode=builder.get('enable_platform_mode'))
180 dynamic_perf_tests.run(api, None) 185 dynamic_perf_tests.run(api, None)
181 186
182 if failures: 187 if failures:
183 raise api.step.StepFailure('src-side perf tests failed %s' % failures) 188 raise api.step.StepFailure('src-side perf tests failed %s' % failures)
184 finally: 189 finally:
185 api.chromium_android.common_tests_final_steps( 190 api.chromium_android.common_tests_final_steps(
186 logcat_gs_bucket='chromium-android') 191 logcat_gs_bucket='chromium-android')
187 192
188 193
189 def _sanitize_nonalpha(text): 194 def _sanitize_nonalpha(text):
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 mastername='chromium.perf', 283 mastername='chromium.perf',
279 buildername='Android Nexus5 Perf (1)', 284 buildername='Android Nexus5 Perf (1)',
280 parent_buildername='parent_buildername', 285 parent_buildername='parent_buildername',
281 parent_buildnumber='1729', 286 parent_buildnumber='1729',
282 parent_revision='deadbeef', 287 parent_revision='deadbeef',
283 revision='deadbeef', 288 revision='deadbeef',
284 slavename='slavename', 289 slavename='slavename',
285 target='Release') + 290 target='Release') +
286 api.override_step_data( 291 api.override_step_data(
287 'perf_test.foo', retcode=87)) 292 'perf_test.foo', retcode=87))
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/chromium_tests/steps.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698