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

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

Issue 233203003: Fix get_device_configuration.py/device_utils.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use basestring instead of str or unicode Created 6 years, 8 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 | build/android/pylib/device/device_utils.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
11 import re 11 import re
12 import sys 12 import sys
13 13
14 from util import build_utils 14 from util import build_utils
15 15
16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..') 16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..', '..')
17 sys.path.append(BUILD_ANDROID_DIR) 17 sys.path.append(BUILD_ANDROID_DIR)
18 18
19 from pylib import android_commands 19 from pylib import android_commands
20 from pylib.device import device_utils 20 from pylib.device import device_utils
21 21
22 GetAttachedDevices = android_commands.GetAttachedDevices() 22 GetAttachedDevices = android_commands.GetAttachedDevices
23 23
24 24
25 class BuildDevice(object): 25 class BuildDevice(object):
26 def __init__(self, configuration): 26 def __init__(self, configuration):
27 self.id = configuration['id'] 27 self.id = configuration['id']
28 self.description = configuration['description'] 28 self.description = configuration['description']
29 self.install_metadata = configuration['install_metadata'] 29 self.install_metadata = configuration['install_metadata']
30 self.device = device_utils.DeviceUtils(self.id) 30 self.device = device_utils.DeviceUtils(self.id)
31 31
32 def RunShellCommand(self, *args, **kwargs): 32 def RunShellCommand(self, *args, **kwargs):
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 assert len(configurations) == 1 90 assert len(configurations) == 1
91 return BuildDevice(configurations[0]) 91 return BuildDevice(configurations[0])
92 92
93 93
94 def GetBuildDeviceFromPath(path): 94 def GetBuildDeviceFromPath(path):
95 configurations = ReadConfigurations(path) 95 configurations = ReadConfigurations(path)
96 if len(configurations) > 0: 96 if len(configurations) > 0:
97 return GetBuildDevice(ReadConfigurations(path)) 97 return GetBuildDevice(ReadConfigurations(path))
98 return None 98 return None
99 99
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698