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 |
11 | 11 |
12 DIR_SOURCE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), | 12 DIR_SOURCE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), |
13 os.pardir, os.pardir, os.pardir)) | 13 os.pardir, os.pardir, os.pardir)) |
14 ISOLATE_DEPS_DIR = os.path.join(DIR_SOURCE_ROOT, 'isolate_deps_dir') | 14 ISOLATE_DEPS_DIR = os.path.join(DIR_SOURCE_ROOT, 'isolate_deps_dir') |
15 EMULATOR_SDK_ROOT = os.path.abspath(os.path.join(DIR_SOURCE_ROOT, os.pardir, | 15 EMULATOR_SDK_ROOT = os.path.abspath(os.path.join(DIR_SOURCE_ROOT, os.pardir, |
16 os.pardir)) | 16 os.pardir)) |
17 CHROME_PACKAGE = 'com.google.android.apps.chrome' | 17 CHROME_PACKAGE = 'com.google.android.apps.chrome' |
18 CHROME_ACTIVITY = 'com.google.android.apps.chrome.Main' | 18 CHROME_ACTIVITY = 'com.google.android.apps.chrome.Main' |
19 CHROME_DEVTOOLS_SOCKET = 'chrome_devtools_remote' | 19 CHROME_DEVTOOLS_SOCKET = 'chrome_devtools_remote' |
| 20 CHROME_COMMAND_LINE_FILE = '/data/local/chrome-command-line' |
20 | 21 |
21 CHROME_STABLE_PACKAGE = 'com.android.chrome' | 22 CHROME_STABLE_PACKAGE = 'com.android.chrome' |
22 CHROME_BETA_PACKAGE = 'com.chrome.beta' | 23 CHROME_BETA_PACKAGE = 'com.chrome.beta' |
23 | 24 |
24 CHROME_TESTS_PACKAGE = 'com.google.android.apps.chrome.tests' | 25 CHROME_TESTS_PACKAGE = 'com.google.android.apps.chrome.tests' |
25 | 26 |
26 LEGACY_BROWSER_PACKAGE = 'com.google.android.browser' | 27 LEGACY_BROWSER_PACKAGE = 'com.google.android.browser' |
27 LEGACY_BROWSER_ACTIVITY = 'com.android.browser.BrowserActivity' | 28 LEGACY_BROWSER_ACTIVITY = 'com.android.browser.BrowserActivity' |
28 | 29 |
29 CONTENT_SHELL_PACKAGE = 'org.chromium.content_shell_apk' | 30 CONTENT_SHELL_PACKAGE = 'org.chromium.content_shell_apk' |
30 CONTENT_SHELL_ACTIVITY = 'org.chromium.content_shell_apk.ContentShellActivity' | 31 CONTENT_SHELL_ACTIVITY = 'org.chromium.content_shell_apk.ContentShellActivity' |
| 32 CONTENT_SHELL_COMMAND_LINE_FILE = '/data/local/tmp/content-shell-command-line' |
31 | 33 |
32 CHROME_SHELL_PACKAGE = 'org.chromium.chrome.browser.test' | 34 CHROME_SHELL_PACKAGE = 'org.chromium.chrome.browser.test' |
33 | 35 |
34 CHROMIUM_TEST_SHELL_PACKAGE = 'org.chromium.chrome.testshell' | 36 CHROMIUM_TEST_SHELL_PACKAGE = 'org.chromium.chrome.testshell' |
35 CHROMIUM_TEST_SHELL_ACTIVITY = ( | 37 CHROMIUM_TEST_SHELL_ACTIVITY = ( |
36 'org.chromium.chrome.testshell.ChromiumTestShellActivity') | 38 'org.chromium.chrome.testshell.ChromiumTestShellActivity') |
37 CHROMIUM_TEST_SHELL_DEVTOOLS_SOCKET = 'chromium_testshell_devtools_remote' | 39 CHROMIUM_TEST_SHELL_DEVTOOLS_SOCKET = 'chromium_testshell_devtools_remote' |
38 CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR = os.path.join( | 40 CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR = os.path.join( |
39 DIR_SOURCE_ROOT, 'chrome', 'android') | 41 DIR_SOURCE_ROOT, 'chrome', 'android') |
| 42 CHROME_TEST_SHELL_COMMAND_LINE_FILE = \ |
| 43 '/data/local/tmp/chromium-testshell-command-line' |
40 | 44 |
41 GTEST_TEST_PACKAGE_NAME = 'org.chromium.native_test' | 45 GTEST_TEST_PACKAGE_NAME = 'org.chromium.native_test' |
42 GTEST_TEST_ACTIVITY_NAME = 'org.chromium.native_test.ChromeNativeTestActivity' | 46 GTEST_TEST_ACTIVITY_NAME = 'org.chromium.native_test.ChromeNativeTestActivity' |
43 GTEST_COMMAND_LINE_FILE = 'chrome-native-tests-command-line' | 47 GTEST_COMMAND_LINE_FILE = 'chrome-native-tests-command-line' |
44 | 48 |
45 BROWSERTEST_TEST_PACKAGE_NAME = 'org.chromium.content_browsertests_apk' | 49 BROWSERTEST_TEST_PACKAGE_NAME = 'org.chromium.content_browsertests_apk' |
46 BROWSERTEST_TEST_ACTIVITY_NAME = ( | 50 BROWSERTEST_TEST_ACTIVITY_NAME = ( |
47 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity') | 51 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity') |
48 BROWSERTEST_COMMAND_LINE_FILE = 'content-browser-tests-command-line' | 52 BROWSERTEST_COMMAND_LINE_FILE = 'content-browser-tests-command-line' |
49 | 53 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 except OSError: | 113 except OSError: |
110 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' | 114 print >> sys.stderr, 'No adb found in $PATH, fallback to checked in binary.' |
111 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') | 115 return os.path.join(ANDROID_SDK_ROOT, 'platform-tools', 'adb') |
112 | 116 |
113 | 117 |
114 ADB_PATH = _GetADBPath() | 118 ADB_PATH = _GetADBPath() |
115 | 119 |
116 # Exit codes | 120 # Exit codes |
117 ERROR_EXIT_CODE = 1 | 121 ERROR_EXIT_CODE = 1 |
118 WARNING_EXIT_CODE = 88 | 122 WARNING_EXIT_CODE = 88 |
OLD | NEW |