Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: build/android/pylib/constants.py

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/gyp/pack_arm_relocations.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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'))
176 176
177 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT, 177 BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT,
178 os.environ.get('CHROMIUM_OUT_DIR', 'out'), 178 os.environ.get('CHROMIUM_OUT_DIR', 'out'),
179 'bad_devices.json') 179 'bad_devices.json')
180 180
181 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' 181 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com'
182 182
183 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop' 183 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop'
184 184
185 PYTHON_UNIT_TEST_SUITES = {
186 'pylib_py_unittests': {
187 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android'),
188 'test_modules': [
189 'pylib.device.device_utils_test',
190 ]
191 },
192 # TODO(mkosiba) Enable after fixing these tests.
193 # 'gyp_py_unittests': {
194 # 'path': os.path.join(constants.DIR_SOURCE_ROOT, 'build', 'android', 'gyp'),
195 # 'test_modules': [
196 # 'java_cpp_enum_tests'
197 # ]
198 # },
199 }
200
201
185 def GetBuildType(): 202 def GetBuildType():
186 try: 203 try:
187 return os.environ['BUILDTYPE'] 204 return os.environ['BUILDTYPE']
188 except KeyError: 205 except KeyError:
189 raise Exception('The BUILDTYPE environment variable has not been set') 206 raise Exception('The BUILDTYPE environment variable has not been set')
190 207
191 208
192 def SetBuildType(build_type): 209 def SetBuildType(build_type):
193 os.environ['BUILDTYPE'] = build_type 210 os.environ['BUILDTYPE'] = build_type
194 211
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 247 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
231 return 'adb' 248 return 'adb'
232 except OSError: 249 except OSError:
233 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.')
234 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 251 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
235 252
236 253
237 # Exit codes 254 # Exit codes
238 ERROR_EXIT_CODE = 1 255 ERROR_EXIT_CODE = 1
239 WARNING_EXIT_CODE = 88 256 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « build/android/gyp/pack_arm_relocations.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698