| 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 import os | 7 import os |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity') | 45 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity') |
| 46 BROWSERTEST_COMMAND_LINE_FILE = 'content-browser-tests-command-line' | 46 BROWSERTEST_COMMAND_LINE_FILE = 'content-browser-tests-command-line' |
| 47 | 47 |
| 48 # Ports arrangement for various test servers used in Chrome for Android. | 48 # Ports arrangement for various test servers used in Chrome for Android. |
| 49 # Lighttpd server will attempt to use 9000 as default port, if unavailable it | 49 # Lighttpd server will attempt to use 9000 as default port, if unavailable it |
| 50 # will find a free port from 8001 - 8999. | 50 # will find a free port from 8001 - 8999. |
| 51 LIGHTTPD_DEFAULT_PORT = 9000 | 51 LIGHTTPD_DEFAULT_PORT = 9000 |
| 52 LIGHTTPD_RANDOM_PORT_FIRST = 8001 | 52 LIGHTTPD_RANDOM_PORT_FIRST = 8001 |
| 53 LIGHTTPD_RANDOM_PORT_LAST = 8999 | 53 LIGHTTPD_RANDOM_PORT_LAST = 8999 |
| 54 TEST_SYNC_SERVER_PORT = 9031 | 54 TEST_SYNC_SERVER_PORT = 9031 |
| 55 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 |
| 55 | 56 |
| 56 # The net test server is started from port 10201. | 57 # The net test server is started from port 10201. |
| 57 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once | 58 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once |
| 58 # http://crbug.com/239014 is fixed properly. | 59 # http://crbug.com/239014 is fixed properly. |
| 59 TEST_SERVER_PORT_FIRST = 10201 | 60 TEST_SERVER_PORT_FIRST = 10201 |
| 60 TEST_SERVER_PORT_LAST = 30000 | 61 TEST_SERVER_PORT_LAST = 30000 |
| 61 # A file to record next valid port of test server. | 62 # A file to record next valid port of test server. |
| 62 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' | 63 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' |
| 63 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' | 64 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' |
| 64 | 65 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 except OSError: | 107 except OSError: |
| 107 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' | 108 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' |
| 108 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 109 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
| 109 | 110 |
| 110 | 111 |
| 111 ADB_PATH = _GetADBPath() | 112 ADB_PATH = _GetADBPath() |
| 112 | 113 |
| 113 # Exit codes | 114 # Exit codes |
| 114 ERROR_EXIT_CODE = 1 | 115 ERROR_EXIT_CODE = 1 |
| 115 WARNING_EXIT_CODE = 88 | 116 WARNING_EXIT_CODE = 88 |
| OLD | NEW |