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

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

Issue 293803003: [Android] Fix adb realpath command failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved to PushIfNeeded Created 6 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 # pylint: disable-all 9 # pylint: disable-all
10 10
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 if not os.path.isdir(host_path): 1079 if not os.path.isdir(host_path):
1080 if host_path in self._push_if_needed_cache: 1080 if host_path in self._push_if_needed_cache:
1081 host_path_mtime = self._push_if_needed_cache[host_path] 1081 host_path_mtime = self._push_if_needed_cache[host_path]
1082 if host_path_mtime == os.stat(host_path).st_mtime: 1082 if host_path_mtime == os.stat(host_path).st_mtime:
1083 return 1083 return
1084 1084
1085 size = host_utils.GetRecursiveDiskUsage(host_path) 1085 size = host_utils.GetRecursiveDiskUsage(host_path)
1086 self._pushed_files.append(device_path) 1086 self._pushed_files.append(device_path)
1087 self._potential_push_size += size 1087 self._potential_push_size += size
1088 1088
1089 self.RunShellCommand('mkdir -p "%s"' % device_path)
jbudorick 2014/05/20 18:03:39 I'm still not sure that this will properly handle
jbudorick 2014/05/20 18:53:53 Still not sure w.r.t. the above (although leaning
Kibeom Kim (inactive) 2014/05/20 19:06:15 Oh, I wasn't aware of that device_path can also be
jbudorick 2014/05/20 19:09:40 Yeah, that seems fine to me. As you said, it would
Kibeom Kim (inactive) 2014/05/20 19:13:27 Done.
1089 changed_files = self.GetFilesChanged(host_path, device_path) 1090 changed_files = self.GetFilesChanged(host_path, device_path)
1090 logging.info('Found %d files that need to be pushed to %s', 1091 logging.info('Found %d files that need to be pushed to %s',
1091 len(changed_files), device_path) 1092 len(changed_files), device_path)
1092 if not changed_files: 1093 if not changed_files:
1093 return 1094 return
1094 1095
1095 def Push(host, device): 1096 def Push(host, device):
1096 # NOTE: We can't use adb_interface.Push() because it hardcodes a timeout 1097 # NOTE: We can't use adb_interface.Push() because it hardcodes a timeout
1097 # of 60 seconds which isn't sufficient for a lot of users of this method. 1098 # of 60 seconds which isn't sufficient for a lot of users of this method.
1098 push_command = 'push %s %s' % (host, device) 1099 push_command = 'push %s %s' % (host, device)
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 """ 1970 """
1970 def __init__(self, output): 1971 def __init__(self, output):
1971 self._output = output 1972 self._output = output
1972 1973
1973 def write(self, data): 1974 def write(self, data):
1974 data = data.replace('\r\r\n', '\n') 1975 data = data.replace('\r\r\n', '\n')
1975 self._output.write(data) 1976 self._output.write(data)
1976 1977
1977 def flush(self): 1978 def flush(self):
1978 self._output.flush() 1979 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