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

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

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/pylib/base/test_run_factory.py ('k') | build/android/pylib/device/adb_wrapper.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 114
115 # Ports arrangement for various test servers used in Chrome for Android. 115 # Ports arrangement for various test servers used in Chrome for Android.
116 # Lighttpd server will attempt to use 9000 as default port, if unavailable it 116 # Lighttpd server will attempt to use 9000 as default port, if unavailable it
117 # will find a free port from 8001 - 8999. 117 # will find a free port from 8001 - 8999.
118 LIGHTTPD_DEFAULT_PORT = 9000 118 LIGHTTPD_DEFAULT_PORT = 9000
119 LIGHTTPD_RANDOM_PORT_FIRST = 8001 119 LIGHTTPD_RANDOM_PORT_FIRST = 8001
120 LIGHTTPD_RANDOM_PORT_LAST = 8999 120 LIGHTTPD_RANDOM_PORT_LAST = 8999
121 TEST_SYNC_SERVER_PORT = 9031 121 TEST_SYNC_SERVER_PORT = 9031
122 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 122 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041
123 TEST_POLICY_SERVER_PORT = 9051
123 124
124 # The net test server is started from port 10201. 125 # The net test server is started from port 10201.
125 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once 126 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once
126 # http://crbug.com/239014 is fixed properly. 127 # http://crbug.com/239014 is fixed properly.
127 TEST_SERVER_PORT_FIRST = 10201 128 TEST_SERVER_PORT_FIRST = 10201
128 TEST_SERVER_PORT_LAST = 30000 129 TEST_SERVER_PORT_LAST = 30000
129 # A file to record next valid port of test server. 130 # A file to record next valid port of test server.
130 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' 131 TEST_SERVER_PORT_FILE = '/tmp/test_server_port'
131 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' 132 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock'
132 133
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com' 182 UPSTREAM_FLAKINESS_SERVER = 'test-results.appspot.com'
182 183
183 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop' 184 DEVICE_LOCAL_PROPERTIES_PATH = '/data/local.prop'
184 185
185 PYTHON_UNIT_TEST_SUITES = { 186 PYTHON_UNIT_TEST_SUITES = {
186 'pylib_py_unittests': { 187 'pylib_py_unittests': {
187 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android'), 188 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android'),
188 'test_modules': [ 189 'test_modules': [
189 'pylib.device.device_utils_test', 190 'pylib.device.device_utils_test',
191 'pylib.results.json_results_test',
190 'pylib.utils.md5sum_test', 192 'pylib.utils.md5sum_test',
191 ] 193 ]
192 }, 194 },
193 'gyp_py_unittests': { 195 'gyp_py_unittests': {
194 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android', 'gyp'), 196 'path': os.path.join(DIR_SOURCE_ROOT, 'build', 'android', 'gyp'),
195 'test_modules': [ 197 'test_modules': [
196 'java_cpp_enum_tests', 198 'java_cpp_enum_tests',
197 ] 199 ]
198 }, 200 },
199 } 201 }
200 202
201 LOCAL_MACHINE_TESTS = ['junit', 'python'] 203 LOCAL_MACHINE_TESTS = ['junit', 'python']
202 VALID_ENVIRONMENTS = ['local'] 204 VALID_ENVIRONMENTS = ['local']
205 VALID_TEST_TYPES = ['gtest', 'instrumentation', 'junit', 'linker', 'monkey',
206 'perf', 'python', 'uiautomator']
203 207
204 208
205 def GetBuildType(): 209 def GetBuildType():
206 try: 210 try:
207 return os.environ['BUILDTYPE'] 211 return os.environ['BUILDTYPE']
208 except KeyError: 212 except KeyError:
209 raise Exception('The BUILDTYPE environment variable has not been set') 213 raise Exception('The BUILDTYPE environment variable has not been set')
210 214
211 215
212 def SetBuildType(build_type): 216 def SetBuildType(build_type):
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 with file(os.devnull, 'w') as devnull: 274 with file(os.devnull, 'w') as devnull:
271 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) 275 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
272 return 'adb' 276 return 'adb'
273 except OSError: 277 except OSError:
274 logging.debug('No adb found in $PATH, fallback to checked in binary.') 278 logging.debug('No adb found in $PATH, fallback to checked in binary.')
275 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') 279 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb')
276 280
277 # Exit codes 281 # Exit codes
278 ERROR_EXIT_CODE = 1 282 ERROR_EXIT_CODE = 1
279 WARNING_EXIT_CODE = 88 283 WARNING_EXIT_CODE = 88
OLDNEW
« no previous file with comments | « build/android/pylib/base/test_run_factory.py ('k') | build/android/pylib/device/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698