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

Side by Side Diff: build/android/gyp/util/build_device.py

Issue 184493006: Rename to ChromiumTestShell package from testshell to shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix py lint Created 6 years, 9 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 | « build/android/gyp/apk_install.py ('k') | build/android/pylib/constants.py » ('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 """ A simple device interface for build steps. 5 """ A simple device interface for build steps.
6 6
7 """ 7 """
8 8
9 import logging 9 import logging
10 import os 10 import os
(...skipping 26 matching lines...) Expand all
37 def GetSerialNumber(self): 37 def GetSerialNumber(self):
38 return self.id 38 return self.id
39 39
40 def Install(self, *args, **kwargs): 40 def Install(self, *args, **kwargs):
41 return self.adb.Install(*args, **kwargs) 41 return self.adb.Install(*args, **kwargs)
42 42
43 def GetInstallMetadata(self, apk_package): 43 def GetInstallMetadata(self, apk_package):
44 """Gets the metadata on the device for the apk_package apk.""" 44 """Gets the metadata on the device for the apk_package apk."""
45 # Matches lines like: 45 # Matches lines like:
46 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ 46 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \
47 # org.chromium.chrome.testshell.apk 47 # org.chromium.chrome.shell.apk
48 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \ 48 # -rw-r--r-- system system 7376582 2013-04-19 16:34 \
49 # org.chromium.chrome.testshell-1.apk 49 # org.chromium.chrome.shell-1.apk
50 apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s) 50 apk_matcher = lambda s: re.match('.*%s(-[0-9]*)?.apk$' % apk_package, s)
51 matches = filter(apk_matcher, self.install_metadata) 51 matches = filter(apk_matcher, self.install_metadata)
52 return matches[0] if matches else None 52 return matches[0] if matches else None
53 53
54 54
55 def GetConfigurationForDevice(id): 55 def GetConfigurationForDevice(id):
56 adb = android_commands.AndroidCommands(id) 56 adb = android_commands.AndroidCommands(id)
57 configuration = None 57 configuration = None
58 has_root = False 58 has_root = False
59 is_online = adb.IsOnline() 59 is_online = adb.IsOnline()
(...skipping 29 matching lines...) Expand all
89 assert len(configurations) == 1 89 assert len(configurations) == 1
90 return BuildDevice(configurations[0]) 90 return BuildDevice(configurations[0])
91 91
92 92
93 def GetBuildDeviceFromPath(path): 93 def GetBuildDeviceFromPath(path):
94 configurations = ReadConfigurations(path) 94 configurations = ReadConfigurations(path)
95 if len(configurations) > 0: 95 if len(configurations) > 0:
96 return GetBuildDevice(ReadConfigurations(path)) 96 return GetBuildDevice(ReadConfigurations(path))
97 return None 97 return None
98 98
OLDNEW
« no previous file with comments | « build/android/gyp/apk_install.py ('k') | build/android/pylib/constants.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698