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

Side by Side Diff: build/android/pylib/android_commands.py

Issue 15956002: Print the serial number of the device that timed out. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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 | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 """Provides an interface to communicate with the device via the adb command. 5 """Provides an interface to communicate with the device via the adb command.
6 6
7 Assumes adb binary is currently on system path. 7 Assumes adb binary is currently on system path.
8 """ 8 """
9 9
10 import collections 10 import collections
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 while True: 379 while True:
380 try: 380 try:
381 if not keep_data: 381 if not keep_data:
382 assert package_name 382 assert package_name
383 self.Uninstall(package_name) 383 self.Uninstall(package_name)
384 install_status = self.Install(apk_path, reinstall=keep_data) 384 install_status = self.Install(apk_path, reinstall=keep_data)
385 if 'Success' in install_status: 385 if 'Success' in install_status:
386 return install_status 386 return install_status
387 except errors.WaitForResponseTimedOutError: 387 except errors.WaitForResponseTimedOutError:
388 print '@@@STEP_WARNINGS@@@' 388 print '@@@STEP_WARNINGS@@@'
389 logging.info('Timeout on installing %s' % apk_path) 389 logging.info('Timeout on installing %s on device %s', apk_path,
390 self._device)
390 391
391 if reboots_left <= 0: 392 if reboots_left <= 0:
392 raise Exception('Install failure') 393 raise Exception('Install failure')
393 394
394 # Force a hard reboot on last attempt 395 # Force a hard reboot on last attempt
395 self.Reboot(full_reboot=(reboots_left == 1)) 396 self.Reboot(full_reboot=(reboots_left == 1))
396 reboots_left -= 1 397 reboots_left -= 1
397 398
398 def MakeSystemFolderWritable(self): 399 def MakeSystemFolderWritable(self):
399 """Remounts the /system folder rw.""" 400 """Remounts the /system folder rw."""
(...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 """ 1313 """
1313 def __init__(self, output): 1314 def __init__(self, output):
1314 self._output = output 1315 self._output = output
1315 1316
1316 def write(self, data): 1317 def write(self, data):
1317 data = data.replace('\r\r\n', '\n') 1318 data = data.replace('\r\r\n', '\n')
1318 self._output.write(data) 1319 self._output.write(data)
1319 1320
1320 def flush(self): 1321 def flush(self):
1321 self._output.flush() 1322 self._output.flush()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698