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 | 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 161 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
162 'third_party/android_tools/sdk') | 162 'third_party/android_tools/sdk') |
163 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, | 163 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, |
164 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) | 164 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) |
165 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 165 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
166 'third_party/android_tools/ndk') | 166 'third_party/android_tools/ndk') |
167 | 167 |
168 PROGUARD_SCRIPT_PATH = os.path.join( | 168 PROGUARD_SCRIPT_PATH = os.path.join( |
169 ANDROID_SDK_ROOT, 'tools', 'proguard', 'bin', 'proguard.sh') | 169 ANDROID_SDK_ROOT, 'tools', 'proguard', 'bin', 'proguard.sh') |
170 | 170 |
171 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', | |
172 os.path.join(DIR_SOURCE_ROOT, | |
173 'android_emulator_sdk')) | |
174 | |
175 PROGUARD_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party', 'proguard') | 171 PROGUARD_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party', 'proguard') |
176 | 172 |
177 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, | 173 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, |
178 os.environ.get('CHROMIUM_OUT_DIR', 'out'), | 174 os.environ.get('CHROMIUM_OUT_DIR', 'out'), |
179 'bad_devices.json') | 175 'bad_devices.json') |
180 | 176 |
181 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' | 177 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' |
182 | 178 |
183 # TODO(jbudorick): Remove once unused. | 179 # TODO(jbudorick): Remove once unused. |
184 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop' | 180 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop' |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 275 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
280 return 'adb' | 276 return 'adb' |
281 except OSError: | 277 except OSError: |
282 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 278 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
283 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 279 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
284 | 280 |
285 # Exit codes | 281 # Exit codes |
286 ERROR_EXIT_CODE = 1 | 282 ERROR_EXIT_CODE = 1 |
287 INFRA_EXIT_CODE = 87 | 283 INFRA_EXIT_CODE = 87 |
288 WARNING_EXIT_CODE = 88 | 284 WARNING_EXIT_CODE = 88 |
OLD | NEW |