Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1381)

Unified Diff: build/android/pylib/constants.py

Issue 23467004: [android] Update FlagChanger to work with additional apks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cmd_helper._Call -> cmd_helper.Call Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/cmd_helper.py ('k') | build/android/pylib/flag_changer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/constants.py
diff --git a/build/android/pylib/constants.py b/build/android/pylib/constants.py
index 59ffcd421e48914f86986f4bfa42759651fe9637..ea148e7358669f3343fdae31624d6d96c2e96e8c 100644
--- a/build/android/pylib/constants.py
+++ b/build/android/pylib/constants.py
@@ -4,6 +4,7 @@
"""Defines a set of constants shared by test runners and other scripts."""
+import collections
import os
import subprocess
import sys
@@ -14,23 +15,20 @@ DIR_SOURCE_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__),
ISOLATE_DEPS_DIR = os.path.join(DIR_SOURCE_ROOT, 'isolate_deps_dir')
EMULATOR_SDK_ROOT = os.path.abspath(os.path.join(DIR_SOURCE_ROOT, os.pardir,
os.pardir))
+
+# TODO(craigdh): Remove these once references have been removed downstream.
CHROME_PACKAGE = 'com.google.android.apps.chrome'
CHROME_ACTIVITY = 'com.google.android.apps.chrome.Main'
-CHROME_DEVTOOLS_SOCKET = 'chrome_devtools_remote'
CHROME_STABLE_PACKAGE = 'com.android.chrome'
CHROME_BETA_PACKAGE = 'com.chrome.beta'
-CHROME_TESTS_PACKAGE = 'com.google.android.apps.chrome.tests'
-
LEGACY_BROWSER_PACKAGE = 'com.google.android.browser'
LEGACY_BROWSER_ACTIVITY = 'com.android.browser.BrowserActivity'
CONTENT_SHELL_PACKAGE = 'org.chromium.content_shell_apk'
CONTENT_SHELL_ACTIVITY = 'org.chromium.content_shell_apk.ContentShellActivity'
-CHROME_SHELL_PACKAGE = 'org.chromium.chrome.browser.test'
-
CHROMIUM_TEST_SHELL_PACKAGE = 'org.chromium.chrome.testshell'
CHROMIUM_TEST_SHELL_ACTIVITY = (
'org.chromium.chrome.testshell.ChromiumTestShellActivity')
@@ -38,14 +36,50 @@ CHROMIUM_TEST_SHELL_DEVTOOLS_SOCKET = 'chromium_testshell_devtools_remote'
CHROMIUM_TEST_SHELL_HOST_DRIVEN_DIR = os.path.join(
DIR_SOURCE_ROOT, 'chrome', 'android')
-GTEST_TEST_PACKAGE_NAME = 'org.chromium.native_test'
-GTEST_TEST_ACTIVITY_NAME = 'org.chromium.native_test.ChromeNativeTestActivity'
-GTEST_COMMAND_LINE_FILE = 'chrome-native-tests-command-line'
-BROWSERTEST_TEST_PACKAGE_NAME = 'org.chromium.content_browsertests_apk'
-BROWSERTEST_TEST_ACTIVITY_NAME = (
- 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity')
-BROWSERTEST_COMMAND_LINE_FILE = 'content-browser-tests-command-line'
+PackageInfo = collections.namedtuple('PackageInfo',
+ ['package', 'activity', 'cmdline_file', 'devtools_socket',
+ 'test_package'])
+
+PACKAGE_INFO = {
+ 'chrome': PackageInfo(
+ CHROME_PACKAGE,
+ CHROME_ACTIVITY,
+ '/data/local/chrome-command-line',
+ 'chrome_devtools_remote',
+ 'com.google.android.apps.chrome.tests'),
+ 'legacy_browser': PackageInfo(
+ LEGACY_BROWSER_PACKAGE,
+ LEGACY_BROWSER_ACTIVITY,
+ None,
+ None,
+ None),
+ 'content_shell': PackageInfo(
+ CONTENT_SHELL_PACKAGE,
+ CONTENT_SHELL_ACTIVITY,
+ '/data/local/tmp/content-shell-command-line',
+ None,
+ None),
+ 'chromium_test_shell': PackageInfo(
+ CHROMIUM_TEST_SHELL_PACKAGE,
+ CHROMIUM_TEST_SHELL_ACTIVITY,
+ '/data/local/tmp/chromium-testshell-command-line',
+ CHROMIUM_TEST_SHELL_DEVTOOLS_SOCKET,
+ 'org.chromium.chrome.testshell.tests'),
+ 'gtest': PackageInfo(
+ 'org.chromium.native_test',
+ 'org.chromium.native_test.ChromeNativeTestActivity',
+ '/data/local/tmp/chrome-native-tests-command-line',
+ None,
+ None),
+ 'content_browsertests': PackageInfo(
+ 'org.chromium.content_browsertests_apk',
+ 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity',
+ '/data/local/tmp/content-browser-tests-command-line',
+ None,
+ None),
+}
+
# Ports arrangement for various test servers used in Chrome for Android.
# Lighttpd server will attempt to use 9000 as default port, if unavailable it
« no previous file with comments | « build/android/pylib/cmd_helper.py ('k') | build/android/pylib/flag_changer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698