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 collections | 7 import collections |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 None), | 80 None), |
81 } | 81 } |
82 | 82 |
83 | 83 |
84 # Ports arrangement for various test servers used in Chrome for Android. | 84 # Ports arrangement for various test servers used in Chrome for Android. |
85 # Lighttpd server will attempt to use 9000 as default port, if unavailable it | 85 # Lighttpd server will attempt to use 9000 as default port, if unavailable it |
86 # will find a free port from 8001 - 8999. | 86 # will find a free port from 8001 - 8999. |
87 LIGHTTPD_DEFAULT_PORT = 9000 | 87 LIGHTTPD_DEFAULT_PORT = 9000 |
88 LIGHTTPD_RANDOM_PORT_FIRST = 8001 | 88 LIGHTTPD_RANDOM_PORT_FIRST = 8001 |
89 LIGHTTPD_RANDOM_PORT_LAST = 8999 | 89 LIGHTTPD_RANDOM_PORT_LAST = 8999 |
90 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 | |
90 TEST_SYNC_SERVER_PORT = 9031 | 91 TEST_SYNC_SERVER_PORT = 9031 |
91 TEST_SEARCH_BY_IMAGE_SERVER_PORT = 9041 | 92 TEST_SERVER_HOST = '127.0.0.1' |
93 | |
94 # Paths for various test server executables. | |
95 TEST_NET_SERVER_PATH = 'net/tools/testserver/testserver.py' | |
96 TEST_SYNC_SERVER_PATH = 'sync/tools/testserver/sync_testserver.py' | |
frankf
2013/08/30 18:22:43
So these constants only needed to be used by modul
nyquist
2013/08/30 21:50:59
Done. Also reverted my other change to this patch.
| |
92 | 97 |
93 # The net test server is started from port 10201. | 98 # The net test server is started from port 10201. |
94 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once | 99 # TODO(pliard): http://crbug.com/239014. Remove this dirty workaround once |
95 # http://crbug.com/239014 is fixed properly. | 100 # http://crbug.com/239014 is fixed properly. |
96 TEST_SERVER_PORT_FIRST = 10201 | 101 TEST_SERVER_PORT_FIRST = 10201 |
97 TEST_SERVER_PORT_LAST = 30000 | 102 TEST_SERVER_PORT_LAST = 30000 |
98 # A file to record next valid port of test server. | 103 # A file to record next valid port of test server. |
99 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' | 104 TEST_SERVER_PORT_FILE = '/tmp/test_server_port' |
100 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' | 105 TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' |
101 | 106 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 except OSError: | 148 except OSError: |
144 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' | 149 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' |
145 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 150 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
146 | 151 |
147 | 152 |
148 ADB_PATH = _GetADBPath() | 153 ADB_PATH = _GetADBPath() |
149 | 154 |
150 # Exit codes | 155 # Exit codes |
151 ERROR_EXIT_CODE = 1 | 156 ERROR_EXIT_CODE = 1 |
152 WARNING_EXIT_CODE = 88 | 157 WARNING_EXIT_CODE = 88 |
OLD | NEW |