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

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

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Frank's comments. 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
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 """Defines a set of constants shared by test runners and other scripts.""" 5 """Defines a set of constants shared by test runners and other scripts."""
6 # pylint: disable=W0212 6 # pylint: disable=W0212
7 7
8 import collections 8 import collections
9 import logging 9 import logging
10 import os 10 import os
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', 145 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT',
146 os.path.join(DIR_SOURCE_ROOT, 146 os.path.join(DIR_SOURCE_ROOT,
147 'android_emulator_sdk')) 147 'android_emulator_sdk'))
148 148
149 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, 149 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT,
150 os.environ.get('CHROMIUM_OUT_DIR', 'out'), 150 os.environ.get('CHROMIUM_OUT_DIR', 'out'),
151 'bad_devices.json') 151 'bad_devices.json')
152 152
153 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' 153 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com'
154 154
155 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop'
155 156
156 def GetBuildType(): 157 def GetBuildType():
157 try: 158 try:
158 return os.environ['BUILDTYPE'] 159 return os.environ['BUILDTYPE']
159 except KeyError: 160 except KeyError:
160 raise Exception('The BUILDTYPE environment variable has not been set') 161 raise Exception('The BUILDTYPE environment variable has not been set')
161 162
162 163
163 def SetBuildType(build_type): 164 def SetBuildType(build_type):
164 os.environ['BUILDTYPE'] = build_type 165 os.environ['BUILDTYPE'] = build_type
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 198 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
198 return 'adb' 199 return 'adb'
199 except OSError: 200 except OSError:
200 logging.debug('No adb found in $PATH, fallback to checked in binary.') 201 logging.debug('No adb found in $PATH, fallback to checked in binary.')
201 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 202 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
202 203
203 204
204 # Exit codes 205 # Exit codes
205 ERROR_EXIT_CODE = 1 206 ERROR_EXIT_CODE = 1
206 WARNING_EXIT_CODE = 88 207 WARNING_EXIT_CODE = 88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698