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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 | 181 |
182 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 | 182 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 |
183 ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' | 183 ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' |
184 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 184 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
185 'third_party/android_tools/sdk') | 185 'third_party/android_tools/sdk') |
186 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, | 186 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, |
187 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) | 187 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) |
188 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 188 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
189 'third_party/android_tools/ndk') | 189 'third_party/android_tools/ndk') |
190 | 190 |
| 191 PROGUARD_SCRIPT_PATH = os.path.join( |
| 192 ANDROID_SDK_ROOT, 'tools', 'proguard', 'bin', 'proguard.sh') |
| 193 |
191 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', | 194 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', |
192 os.path.join(DIR_SOURCE_ROOT, | 195 os.path.join(DIR_SOURCE_ROOT, |
193 'android_emulator_sdk')) | 196 'android_emulator_sdk')) |
194 | 197 |
195 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, | 198 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, |
196 os.environ.get('CHROMIUM_OUT_DIR', 'out'), | 199 os.environ.get('CHROMIUM_OUT_DIR', 'out'), |
197 'bad_devices.json') | 200 'bad_devices.json') |
198 | 201 |
199 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' | 202 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' |
200 | 203 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 298 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
296 return 'adb' | 299 return 'adb' |
297 except OSError: | 300 except OSError: |
298 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 301 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
299 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 302 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
300 | 303 |
301 # Exit codes | 304 # Exit codes |
302 ERROR_EXIT_CODE = 1 | 305 ERROR_EXIT_CODE = 1 |
303 INFRA_EXIT_CODE = 87 | 306 INFRA_EXIT_CODE = 87 |
304 WARNING_EXIT_CODE = 88 | 307 WARNING_EXIT_CODE = 88 |
OLD | NEW |