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