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

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

Issue 36153002: [android] Clean up logging in test script pushes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« 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 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 def GetHostSize(path): 870 def GetHostSize(path):
871 return int(cmd_helper.GetCmdOutput(['du', '-sb', path]).split()[0]) 871 return int(cmd_helper.GetCmdOutput(['du', '-sb', path]).split()[0])
872 872
873 size = GetHostSize(host_path) 873 size = GetHostSize(host_path)
874 self._pushed_files.append(device_path) 874 self._pushed_files.append(device_path)
875 self._potential_push_size += size 875 self._potential_push_size += size
876 876
877 changed_files = self.GetFilesChanged(host_path, device_path) 877 changed_files = self.GetFilesChanged(host_path, device_path)
878 logging.info('Found %d files that need to be pushed to %s', 878 logging.info('Found %d files that need to be pushed to %s',
879 len(changed_files), device_path) 879 len(changed_files), device_path)
880 logging.info([os.path.relpath(f[0], host_path) for f in changed_files])
881 if not changed_files: 880 if not changed_files:
882 return 881 return
883 882
884 def Push(host, device): 883 def Push(host, device):
885 # NOTE: We can't use adb_interface.Push() because it hardcodes a timeout 884 # NOTE: We can't use adb_interface.Push() because it hardcodes a timeout
886 # of 60 seconds which isn't sufficient for a lot of users of this method. 885 # of 60 seconds which isn't sufficient for a lot of users of this method.
887 push_command = 'push %s %s' % (host, device) 886 push_command = 'push %s %s' % (host, device)
888 self._LogShell(push_command) 887 self._LogShell(push_command)
889 888
890 # Retry push with increasing backoff if the device is busy. 889 # Retry push with increasing backoff if the device is busy.
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
1641 """ 1640 """
1642 def __init__(self, output): 1641 def __init__(self, output):
1643 self._output = output 1642 self._output = output
1644 1643
1645 def write(self, data): 1644 def write(self, data):
1646 data = data.replace('\r\r\n', '\n') 1645 data = data.replace('\r\r\n', '\n')
1647 self._output.write(data) 1646 self._output.write(data)
1648 1647
1649 def flush(self): 1648 def flush(self):
1650 self._output.flush() 1649 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