| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 } | 128 } |
| 129 | 129 |
| 130 | 130 |
| 131 # Ports arrangement for various test servers used in Chrome for Android. | 131 # Ports arrangement for various test servers used in Chrome for Android. |
| 132 # Lighttpd server will attempt to use 9000 as default port, if unavailable it | 132 # Lighttpd server will attempt to use 9000 as default port, if unavailable it |
| 133 # will find a free port from 8001 - 8999. | 133 # will find a free port from 8001 - 8999. |
| 134 LIGHTTPD_DEFAULT_PORT = 9000 | 134 LIGHTTPD_DEFAULT_PORT = 9000 |
| 135 LIGHTTPD_RANDOM_PORT_FIRST = 8001 | 135 LIGHTTPD_RANDOM_PORT_FIRST = 8001 |
| 136 LIGHTTPD_RANDOM_PORT_LAST = 8999 | 136 LIGHTTPD_RANDOM_PORT_LAST = 8999 |
| 137 TEST_SYNC_SERVER_PORT = 9031 | 137 TEST_SYNC_SERVER_PORT = 9031 |
| 138 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 | |
| 139 TEST_POLICY_SERVER_PORT = 9051 | 138 TEST_POLICY_SERVER_PORT = 9051 |
| 140 | 139 |
| 141 | 140 |
| 142 TEST_EXECUTABLE_DIR = '/data/local/tmp' | 141 TEST_EXECUTABLE_DIR = '/data/local/tmp' |
| 143 # Directories for common java libraries for SDK build. | 142 # Directories for common java libraries for SDK build. |
| 144 # These constants are defined in build/android/ant/common.xml | 143 # These constants are defined in build/android/ant/common.xml |
| 145 SDK_BUILD_JAVALIB_DIR = 'lib.java' | 144 SDK_BUILD_JAVALIB_DIR = 'lib.java' |
| 146 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' | 145 SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' |
| 147 SDK_BUILD_APKS_DIR = 'apks' | 146 SDK_BUILD_APKS_DIR = 'apks' |
| 148 | 147 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) | 278 subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull) |
| 280 return 'adb' | 279 return 'adb' |
| 281 except OSError: | 280 except OSError: |
| 282 logging.debug('No adb found in $PATH, fallback to checked in binary.') | 281 logging.debug('No adb found in $PATH, fallback to checked in binary.') |
| 283 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 282 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 284 | 283 |
| 285 # Exit codes | 284 # Exit codes |
| 286 ERROR_EXIT_CODE = 1 | 285 ERROR_EXIT_CODE = 1 |
| 287 INFRA_EXIT_CODE = 87 | 286 INFRA_EXIT_CODE = 87 |
| 288 WARNING_EXIT_CODE = 88 | 287 WARNING_EXIT_CODE = 88 |
| OLD | NEW |