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

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

Issue 1085713002: [Android] DeviceUtils change to make Install work without md5 binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 VALID_ENVIRONMENTS = ['local', 'remote_device'] 212 VALID_ENVIRONMENTS = ['local', 'remote_device']
213 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey', 213 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey',
214 'perf', 'python', 'uiautomator', 'uirobot'] 214 'perf', 'python', 'uiautomator', 'uirobot']
215 VALID_DEVICE_TYPES = ['Android', 'iOS'] 215 VALID_DEVICE_TYPES = ['Android', 'iOS']
216 216
217 217
218 def GetBuildType(): 218 def GetBuildType():
219 try: 219 try:
220 return os.environ['BUILDTYPE'] 220 return os.environ['BUILDTYPE']
221 except KeyError: 221 except KeyError:
222 raise Exception('The BUILDTYPE environment variable has not been set') 222 raise EnvironmentError(
223 'The BUILDTYPE environment variable has not been set')
223 224
224 225
225 def SetBuildType(build_type): 226 def SetBuildType(build_type):
226 os.environ['BUILDTYPE'] = build_type 227 os.environ['BUILDTYPE'] = build_type
227 228
228 229
229 def SetBuildDirectory(build_directory): 230 def SetBuildDirectory(build_directory):
230 os.environ['CHROMIUM_OUT_DIR'] = build_directory 231 os.environ['CHROMIUM_OUT_DIR'] = build_directory
231 232
232 233
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 285 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
285 return 'adb' 286 return 'adb'
286 except OSError: 287 except OSError:
287 logging.debug('No adb found in $PATH, fallback to checked in binary.') 288 logging.debug('No adb found in $PATH, fallback to checked in binary.')
288 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 289 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
289 290
290 # Exit codes 291 # Exit codes
291 ERROR_EXIT_CODE = 1 292 ERROR_EXIT_CODE = 1
292 INFRA_EXIT_CODE = 87 293 INFRA_EXIT_CODE = 87
293 WARNING_EXIT_CODE = 88 294 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils.py » ('j') | build/android/pylib/device/device_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698