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

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

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
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 6
7 # TODO(jbudorick): Split these constants into coherent modules. 7 # TODO(jbudorick): Split these constants into coherent modules.
8 8
9 # pylint: disable=W0212 9 # pylint: disable=W0212
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 'chrome_shell_devtools_remote', 95 'chrome_shell_devtools_remote',
96 'org.chromium.chrome.shell.tests'), 96 'org.chromium.chrome.shell.tests'),
97 'android_webview_shell': PackageInfo( 97 'android_webview_shell': PackageInfo(
98 'org.chromium.android_webview.shell', 98 'org.chromium.android_webview.shell',
99 'org.chromium.android_webview.shell.AwShellActivity', 99 'org.chromium.android_webview.shell.AwShellActivity',
100 '/data/local/tmp/android-webview-command-line', 100 '/data/local/tmp/android-webview-command-line',
101 None, 101 None,
102 'org.chromium.android_webview.test'), 102 'org.chromium.android_webview.test'),
103 'gtest': PackageInfo( 103 'gtest': PackageInfo(
104 'org.chromium.native_test', 104 'org.chromium.native_test',
105 'org.chromium.native_test.ChromeNativeTestActivity', 105 'org.chromium.native_test.NativeTestActivity',
106 '/data/local/tmp/chrome-native-tests-command-line', 106 '/data/local/tmp/chrome-native-tests-command-line',
107 None, 107 None,
108 None), 108 None),
109 'components_browsertests': PackageInfo( 109 'components_browsertests': PackageInfo(
110 'org.chromium.components_browsertests_apk', 110 'org.chromium.components_browsertests_apk',
111 ('org.chromium.components_browsertests_apk' + 111 ('org.chromium.components_browsertests_apk' +
112 '.ComponentsBrowserTestsActivity'), 112 '.ComponentsBrowserTestsActivity'),
113 '/data/local/tmp/components-browser-tests-command-line', 113 '/data/local/tmp/components-browser-tests-command-line',
114 None, 114 None,
115 None), 115 None),
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 VALID_ENVIRONMENTS = ['local', 'remote_device'] 222 VALID_ENVIRONMENTS = ['local', 'remote_device']
223 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey', 223 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey',
224 'perf', 'python', 'uiautomator', 'uirobot'] 224 'perf', 'python', 'uiautomator', 'uirobot']
225 VALID_DEVICE_TYPES = ['Android', 'iOS'] 225 VALID_DEVICE_TYPES = ['Android', 'iOS']
226 226
227 227
228 def GetBuildType(): 228 def GetBuildType():
229 try: 229 try:
230 return os.environ['BUILDTYPE'] 230 return os.environ['BUILDTYPE']
231 except KeyError: 231 except KeyError:
232 raise Exception('The BUILDTYPE environment variable has not been set') 232 raise EnvironmentError(
233 'The BUILDTYPE environment variable has not been set')
233 234
234 235
235 def SetBuildType(build_type): 236 def SetBuildType(build_type):
236 os.environ['BUILDTYPE'] = build_type 237 os.environ['BUILDTYPE'] = build_type
237 238
238 239
239 def SetBuildDirectory(build_directory): 240 def SetBuildDirectory(build_directory):
240 os.environ['CHROMIUM_OUT_DIR'] = build_directory 241 os.environ['CHROMIUM_OUT_DIR'] = build_directory
241 242
242 243
243 def SetOutputDirectort(output_directory): 244 def SetOutputDirectory(output_directory):
244 os.environ['CHROMIUM_OUTPUT_DIR'] = output_directory 245 os.environ['CHROMIUM_OUTPUT_DIR'] = output_directory
245 246
246 247
247 def GetOutDirectory(build_type=None): 248 def GetOutDirectory(build_type=None):
248 """Returns the out directory where the output binaries are built. 249 """Returns the out directory where the output binaries are built.
249 250
250 Args: 251 Args:
251 build_type: Build type, generally 'Debug' or 'Release'. Defaults to the 252 build_type: Build type, generally 'Debug' or 'Release'. Defaults to the
252 globally set build type environment variable BUILDTYPE. 253 globally set build type environment variable BUILDTYPE.
253 """ 254 """
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 295 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
295 return 'adb' 296 return 'adb'
296 except OSError: 297 except OSError:
297 logging.debug('No adb found in $PATH, fallback to checked in binary.') 298 logging.debug('No adb found in $PATH, fallback to checked in binary.')
298 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 299 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
299 300
300 # Exit codes 301 # Exit codes
301 ERROR_EXIT_CODE = 1 302 ERROR_EXIT_CODE = 1
302 INFRA_EXIT_CODE = 87 303 INFRA_EXIT_CODE = 87
303 WARNING_EXIT_CODE = 88 304 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_dispatcher_unittest.py ('k') | build/android/pylib/device/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698