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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 """ | 160 """ |
161 | 161 |
162 ICE_CREAM_SANDWICH = 14 | 162 ICE_CREAM_SANDWICH = 14 |
163 ICE_CREAM_SANDWICH_MR1 = 15 | 163 ICE_CREAM_SANDWICH_MR1 = 15 |
164 JELLY_BEAN = 16 | 164 JELLY_BEAN = 16 |
165 JELLY_BEAN_MR1 = 17 | 165 JELLY_BEAN_MR1 = 17 |
166 JELLY_BEAN_MR2 = 18 | 166 JELLY_BEAN_MR2 = 18 |
167 KITKAT = 19 | 167 KITKAT = 19 |
168 KITKAT_WATCH = 20 | 168 KITKAT_WATCH = 20 |
169 LOLLIPOP = 21 | 169 LOLLIPOP = 21 |
| 170 LOLLIPOP_MR1 = 22 |
170 | 171 |
171 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP | 172 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 |
172 ANDROID_SDK_BUILD_TOOLS_VERSION = '21.0.1' | 173 ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' |
173 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 174 ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
174 'third_party/android_tools/sdk') | 175 'third_party/android_tools/sdk') |
175 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, | 176 ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT, |
176 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) | 177 'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION) |
177 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, | 178 ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, |
178 'third_party/android_tools/ndk') | 179 'third_party/android_tools/ndk') |
179 | 180 |
180 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', | 181 EMULATOR_SDK_ROOT = os.environ.get('ANDROID_EMULATOR_SDK_ROOT', |
181 os.path.join(DIR_SOURCE_ROOT, | 182 os.path.join(DIR_SOURCE_ROOT, |
182 'android_emulator_sdk')) | 183 'android_emulator_sdk')) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 284 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
284 return 'adb' | 285 return 'adb' |
285 except OSError: | 286 except OSError: |
286 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 287 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
287 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 288 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
288 | 289 |
289 # Exit codes | 290 # Exit codes |
290 ERROR_EXIT_CODE = 1 | 291 ERROR_EXIT_CODE = 1 |
291 INFRA_EXIT_CODE = 87 | 292 INFRA_EXIT_CODE = 87 |
292 WARNING_EXIT_CODE = 88 | 293 WARNING_EXIT_CODE = 88 |
OLD | NEW |