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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') | 162 '/data/data/' + PACKAGE_INFO['chrome'].package + '/files') |
163 | 163 |
164 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') | 164 SCREENSHOTS_DIR = os.path.join(DIR_SOURCE_ROOT, 'out_screenshots') |
165 | 165 |
166 class ANDROID_SDK_VERSION_CODES(object): | 166 class ANDROID_SDK_VERSION_CODES(object): |
167 """Android SDK version codes. | 167 """Android SDK version codes. |
168 | 168 |
169 http://developer.android.com/reference/android/os/Build.VERSION_CODES.html | 169 http://developer.android.com/reference/android/os/Build.VERSION_CODES.html |
170 """ | 170 """ |
171 | 171 |
172 ICE_CREAM_SANDWICH = 14 | |
173 ICE_CREAM_SANDWICH_MR1 = 15 | |
174 JELLY_BEAN = 16 | 172 JELLY_BEAN = 16 |
175 JELLY_BEAN_MR1 = 17 | 173 JELLY_BEAN_MR1 = 17 |
176 JELLY_BEAN_MR2 = 18 | 174 JELLY_BEAN_MR2 = 18 |
177 KITKAT = 19 | 175 KITKAT = 19 |
178 KITKAT_WATCH = 20 | 176 KITKAT_WATCH = 20 |
179 LOLLIPOP = 21 | 177 LOLLIPOP = 21 |
180 LOLLIPOP_MR1 = 22 | 178 LOLLIPOP_MR1 = 22 |
181 | 179 |
182 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 | 180 ANDROID_SDK_VERSION = ANDROID_SDK_VERSION_CODES.LOLLIPOP_MR1 |
183 ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' | 181 ANDROID_SDK_BUILD_TOOLS_VERSION = '22.0.0' |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 293 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
296 return 'adb' | 294 return 'adb' |
297 except OSError: | 295 except OSError: |
298 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 296 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
299 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 297 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
300 | 298 |
301 # Exit codes | 299 # Exit codes |
302 ERROR_EXIT_CODE = 1 | 300 ERROR_EXIT_CODE = 1 |
303 INFRA_EXIT_CODE = 87 | 301 INFRA_EXIT_CODE = 87 |
304 WARNING_EXIT_CODE = 88 | 302 WARNING_EXIT_CODE = 88 |
OLD | NEW |