| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 ICE_CREAM_SANDWICH = 14 | 155 ICE_CREAM_SANDWICH = 14 |
| 156 ICE_CREAM_SANDWICH_MR1 = 15 | 156 ICE_CREAM_SANDWICH_MR1 = 15 |
| 157 JELLY_BEAN = 16 | 157 JELLY_BEAN = 16 |
| 158 JELLY_BEAN_MR1 = 17 | 158 JELLY_BEAN_MR1 = 17 |
| 159 JELLY_BEAN_MR2 = 18 | 159 JELLY_BEAN_MR2 = 18 |
| 160 KITKAT = 19 | 160 KITKAT = 19 |
| 161 KITKAT_WATCH = 20 | 161 KITKAT_WATCH = 20 |
| 162 LOLLIPOP = 21 | 162 LOLLIPOP = 21 |
| 163 | 163 |
| 164 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP | 164 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP |
| 165 ANDROID_SDK_BUILD_TOOLS_VERSION = '21.0.0' | 165 ANDROID_SDK_BUILD_TOOLS_VERSION = '21.0.1' |
| 166 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 166 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
| 167 'third_party/android_tools/sdk') | 167 'third_party/android_tools/sdk') |
| 168 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, | 168 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, |
| 169 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) | 169 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) |
| 170 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 170 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
| 171 'third_party/android_tools/ndk') | 171 'third_party/android_tools/ndk') |
| 172 | 172 |
| 173 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', | 173 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', |
| 174 os.path.join(DIR_SOURCE_ROOT, | 174 os.path.join(DIR_SOURCE_ROOT, |
| 175 'android_emulator_sdk')) | 175 'android_emulator_sdk')) |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 247 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 248 return 'adb' | 248 return 'adb' |
| 249 except OSError: | 249 except OSError: |
| 250 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 250 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
| 251 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 251 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 252 | 252 |
| 253 | 253 |
| 254 # Exit codes | 254 # Exit codes |
| 255 ERROR_EXIT_CODE = 1 | 255 ERROR_EXIT_CODE = 1 |
| 256 WARNING_EXIT_CODE = 88 | 256 WARNING_EXIT_CODE = 88 |
| OLD | NEW |