michael@0: # Copyright (c) 2012 The Chromium Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: """Defines a set of constants shared by test runners and other scripts.""" michael@0: michael@0: import os michael@0: michael@0: michael@0: CHROME_PACKAGE = 'com.google.android.apps.chrome' michael@0: CHROME_ACTIVITY = 'com.google.android.apps.chrome.Main' michael@0: CHROME_TESTS_PACKAGE = 'com.google.android.apps.chrome.tests' michael@0: LEGACY_BROWSER_PACKAGE = 'com.google.android.browser' michael@0: LEGACY_BROWSER_ACTIVITY = 'com.android.browser.BrowserActivity' michael@0: CONTENT_SHELL_PACKAGE = "org.chromium.content_shell" michael@0: CONTENT_SHELL_ACTIVITY = "org.chromium.content_shell.ContentShellActivity" michael@0: CHROME_SHELL_PACKAGE = 'org.chromium.chrome.browser.test' michael@0: CHROMIUM_TEST_SHELL_PACKAGE = 'org.chromium.chrome.testshell' michael@0: michael@0: CHROME_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), michael@0: '..', '..', '..')) michael@0: michael@0: # Ports arrangement for various test servers used in Chrome for Android. michael@0: # Lighttpd server will attempt to use 9000 as default port, if unavailable it michael@0: # will find a free port from 8001 - 8999. michael@0: LIGHTTPD_DEFAULT_PORT = 9000 michael@0: LIGHTTPD_RANDOM_PORT_FIRST = 8001 michael@0: LIGHTTPD_RANDOM_PORT_LAST = 8999 michael@0: TEST_SYNC_SERVER_PORT = 9031 michael@0: michael@0: # The net test server is started from 10000. Reserve 20000 ports for the all michael@0: # test-server based tests should be enough for allocating different port for michael@0: # individual test-server based test. michael@0: TEST_SERVER_PORT_FIRST = 10000 michael@0: TEST_SERVER_PORT_LAST = 30000 michael@0: # A file to record next valid port of test server. michael@0: TEST_SERVER_PORT_FILE = '/tmp/test_server_port' michael@0: TEST_SERVER_PORT_LOCKFILE = '/tmp/test_server_port.lock' michael@0: michael@0: TEST_EXECUTABLE_DIR = '/data/local/tmp' michael@0: # Directories for common java libraries for SDK build. michael@0: # These constants are defined in build/android/ant/common.xml michael@0: SDK_BUILD_TEST_JAVALIB_DIR = 'test.lib.java' michael@0: SDK_BUILD_APKS_DIR = 'apks' michael@0: michael@0: # The directory on the device where perf test output gets saved to. michael@0: DEVICE_PERF_OUTPUT_DIR = '/data/data/' + CHROME_PACKAGE + '/files'