OLD | NEW |
---|---|
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
138 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' | 138 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' |
139 | 139 |
140 TEST_EXECUTABLE_DIR = '/data/local/tmp' | 140 TEST_EXECUTABLE_DIR = '/data/local/tmp' |
141 # Directories for common java libraries for SDK build. | 141 # Directories for common java libraries for SDK build. |
142 # These constants are defined in build/android/ant/common.xml | 142 # These constants are defined in build/android/ant/common.xml |
143 SDK_BUILD_JAVALIB_DIR = 'lib.java' | 143 SDK_BUILD_JAVALIB_DIR = 'lib.java' |
144 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' | 144 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' |
145 SDK_BUILD_APKS_DIR = 'apks' | 145 SDK_BUILD_APKS_DIR = 'apks' |
146 | 146 |
147 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' | 147 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' |
148 ADB_PUBLIC_KEY = os.path.join(DIR_SOURCE_ROOT, 'build', 'android', 'pylib', | |
149 'adb_key') | |
friedman1
2015/02/24 20:47:11
rename this adbkey.pub
navabi
2015/02/24 20:58:17
Done.
| |
148 | 150 |
149 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results') | 151 PERF_OUTPUT_DIR = os.path.join(DIR_SOURCE_ROOT, 'out', 'step_results') |
150 # The directory on the device where perf test output gets saved to. | 152 # The directory on the device where perf test output gets saved to. |
151 DEVICE_PERF_OUTPUT_DIR = ( | 153 DEVICE_PERF_OUTPUT_DIR = ( |
152 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') | 154 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') |
153 | 155 |
154 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') | 156 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') |
155 | 157 |
156 class ANDROID_SDK_VERSION_CODES(object): | 158 class ANDROID_SDK_VERSION_CODES(object): |
157 """Android SDK version codes. | 159 """Android SDK version codes. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
282 with file(os.devnull, 'w') as devnull: | 284 with file(os.devnull, 'w') as devnull: |
283 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 285 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
284 return 'adb' | 286 return 'adb' |
285 except OSError: | 287 except OSError: |
286 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.') |
287 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 289 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
288 | 290 |
289 # Exit codes | 291 # Exit codes |
290 ERROR_EXIT_CODE = 1 | 292 ERROR_EXIT_CODE = 1 |
291 WARNING_EXIT_CODE = 88 | 293 WARNING_EXIT_CODE = 88 |
OLD | NEW |