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

Side by Side Diff: scripts/slave/recipe_modules/chromium_android/api.py

Issue 2318203002: [Android] Enable USB reset on perf bots. (Closed)
Patch Set: Created 4 years, 3 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/bisection/android_bisect.expected/basic_android_fyi_perf_bisect.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 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 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 import contextlib 5 import contextlib
6 import datetime 6 import datetime
7 import json 7 import json
8 import os 8 import os
9 import pipes 9 import pipes
10 import re 10 import re
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 f.result.presentation.logs[failure] = [failure] 427 f.result.presentation.logs[failure] = [failure]
428 f.result.presentation.status = self.m.step.EXCEPTION 428 f.result.presentation.status = self.m.step.EXCEPTION
429 429
430 def device_recovery(self, restart_usb=False, **kwargs): 430 def device_recovery(self, restart_usb=False, **kwargs):
431 args = [ 431 args = [
432 '--blacklist-file', self.blacklist_file, 432 '--blacklist-file', self.blacklist_file,
433 '--known-devices-file', self.known_devices_file, 433 '--known-devices-file', self.known_devices_file,
434 '--adb-path', self.m.adb.adb_path(), 434 '--adb-path', self.m.adb.adb_path(),
435 '-v' 435 '-v'
436 ] 436 ]
437 if restart_usb:
438 args += ['--enable-usb-reset']
437 self.m.step( 439 self.m.step(
438 'device_recovery', 440 'device_recovery',
439 [self.m.path['checkout'].join('third_party', 'catapult', 'devil', 441 [self.m.path['checkout'].join('third_party', 'catapult', 'devil',
440 'devil', 'android', 'tools', 442 'devil', 'android', 'tools',
441 'device_recovery.py')] + args, 443 'device_recovery.py')] + args,
442 env=self.m.chromium.get_env(), 444 env=self.m.chromium.get_env(),
443 infra_step=True, 445 infra_step=True,
444 **kwargs) 446 **kwargs)
445 447
446 def device_status(self, **kwargs): 448 def device_status(self, **kwargs):
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 self.m.chromium.c.BUILD_CONFIG, 1041 self.m.chromium.c.BUILD_CONFIG,
1040 'test_logs', 1042 'test_logs',
1041 '*.log')], 1043 '*.log')],
1042 ) 1044 )
1043 1045
1044 def common_tests_setup_steps(self, perf_setup=False, 1046 def common_tests_setup_steps(self, perf_setup=False,
1045 remove_system_webview=False, skip_wipe=False): 1047 remove_system_webview=False, skip_wipe=False):
1046 self.create_adb_symlink() 1048 self.create_adb_symlink()
1047 self.spawn_logcat_monitor() 1049 self.spawn_logcat_monitor()
1048 self.authorize_adb_devices() 1050 self.authorize_adb_devices()
1049 self.device_recovery() 1051 # TODO(jbudorick): Restart USB only on perf bots while we
1052 # figure out the fate of the usb reset in general.
1053 self.device_recovery(restart_usb=perf_setup)
1050 if perf_setup: 1054 if perf_setup:
1051 kwargs = { 1055 kwargs = {
1052 'min_battery_level': 95, 1056 'min_battery_level': 95,
1053 'disable_network': True, 1057 'disable_network': True,
1054 'disable_java_debug': True, 1058 'disable_java_debug': True,
1055 'max_battery_temp': 350} 1059 'max_battery_temp': 350}
1056 else: 1060 else:
1057 kwargs = {} 1061 kwargs = {}
1058 if skip_wipe: 1062 if skip_wipe:
1059 kwargs['skip_wipe'] = True 1063 kwargs['skip_wipe'] = True
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1494 script = self.c.test_runner 1498 script = self.c.test_runner
1495 if wrapper_script_suite_name: 1499 if wrapper_script_suite_name:
1496 script = self.m.chromium.output_dir.join('bin', 'run_%s' % 1500 script = self.m.chromium.output_dir.join('bin', 'run_%s' %
1497 wrapper_script_suite_name) 1501 wrapper_script_suite_name)
1498 else: 1502 else:
1499 env = kwargs.get('env', {}) 1503 env = kwargs.get('env', {})
1500 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR', 1504 env['CHROMIUM_OUTPUT_DIR'] = env.get('CHROMIUM_OUTPUT_DIR',
1501 self.m.chromium.output_dir) 1505 self.m.chromium.output_dir)
1502 kwargs['env'] = env 1506 kwargs['env'] = env
1503 return self.m.python(step_name, script, args, **kwargs) 1507 return self.m.python(step_name, script, args, **kwargs)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/bisection/android_bisect.expected/basic_android_fyi_perf_bisect.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698