| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 # Ports arrangement for various test servers used in Chrome for Android. | 132 # Ports arrangement for various test servers used in Chrome for Android. |
| 133 # Lighttpd server will attempt to use 9000 as default port, if unavailable it | 133 # Lighttpd server will attempt to use 9000 as default port, if unavailable it |
| 134 # will find a free port from 8001 - 8999. | 134 # will find a free port from 8001 - 8999. |
| 135 LIGHTTPD_DEFAULT_PORT = 9000 | 135 LIGHTTPD_DEFAULT_PORT = 9000 |
| 136 LIGHTTPD_RANDOM_PORT_FIRST = 8001 | 136 LIGHTTPD_RANDOM_PORT_FIRST = 8001 |
| 137 LIGHTTPD_RANDOM_PORT_LAST = 8999 | 137 LIGHTTPD_RANDOM_PORT_LAST = 8999 |
| 138 TEST_SYNC_SERVER_PORT = 9031 | 138 TEST_SYNC_SERVER_PORT = 9031 |
| 139 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 | 139 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 |
| 140 TEST_POLICY_SERVER_PORT = 9051 | 140 TEST_POLICY_SERVER_PORT = 9051 |
| 141 | 141 |
| 142 # The net test server is started from port 10201. | |
| 143 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once | |
| 144 # http://crbug.com/239014 is fixed properly. | |
| 145 TEST_SERVER_PORT_FIRST = 10201 | |
| 146 TEST_SERVER_PORT_LAST = 30000 | |
| 147 # A file to record next valid port of test server. | |
| 148 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' | |
| 149 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' | |
| 150 | 142 |
| 151 TEST_EXECUTABLE_DIR = '/data/local/tmp' | 143 TEST_EXECUTABLE_DIR = '/data/local/tmp' |
| 152 # Directories for common java libraries for SDK build. | 144 # Directories for common java libraries for SDK build. |
| 153 # These constants are defined in build/android/ant/common.xml | 145 # These constants are defined in build/android/ant/common.xml |
| 154 SDK_BUILD_JAVALIB_DIR = 'lib.java' | 146 SDK_BUILD_JAVALIB_DIR = 'lib.java' |
| 155 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' | 147 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' |
| 156 SDK_BUILD_APKS_DIR = 'apks' | 148 SDK_BUILD_APKS_DIR = 'apks' |
| 157 | 149 |
| 158 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' | 150 ADB_KEYS_FILE = '/data/misc/adb/adb_keys' |
| 159 | 151 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 279 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 288 return 'adb' | 280 return 'adb' |
| 289 except OSError: | 281 except OSError: |
| 290 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 282 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
| 291 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 283 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 292 | 284 |
| 293 # Exit codes | 285 # Exit codes |
| 294 ERROR_EXIT_CODE = 1 | 286 ERROR_EXIT_CODE = 1 |
| 295 INFRA_EXIT_CODE = 87 | 287 INFRA_EXIT_CODE = 87 |
| 296 WARNING_EXIT_CODE = 88 | 288 WARNING_EXIT_CODE = 88 |
| OLD | NEW |