diff options
author | jaekyun <jaekyun@chromium.org> | 2015-04-22 21:22:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 04:22:48 +0000 |
commit | 4ba34ff136727244ead91780152b3248fe7ce0fd (patch) | |
tree | 7d92757a191a5873c0dbdfe3579cd0818d26c434 /build | |
parent | c32d8a85648b9e19320368f1dd91ddaca814fd0e (diff) | |
download | chromium_src-4ba34ff136727244ead91780152b3248fe7ce0fd.zip chromium_src-4ba34ff136727244ead91780152b3248fe7ce0fd.tar.gz chromium_src-4ba34ff136727244ead91780152b3248fe7ce0fd.tar.bz2 |
Enable components_browsertests on Android
BUG=465351
Review URL: https://codereview.chromium.org/1075783002
Cr-Commit-Position: refs/heads/master@{#326449}
Diffstat (limited to 'build')
-rw-r--r-- | build/all.gyp | 1 | ||||
-rw-r--r-- | build/android/pylib/constants/__init__.py | 7 | ||||
-rw-r--r-- | build/android/pylib/gtest/gtest_config.py | 1 | ||||
-rw-r--r-- | build/android/pylib/gtest/gtest_test_instance.py | 7 | ||||
-rw-r--r-- | build/android/pylib/gtest/local_device_gtest_run.py | 3 | ||||
-rw-r--r-- | build/android/pylib/gtest/setup.py | 4 | ||||
-rw-r--r-- | build/android/pylib/gtest/test_package_apk.py | 13 | ||||
-rw-r--r-- | build/android/pylib/gtest/test_runner.py | 1 |
8 files changed, 32 insertions, 5 deletions
diff --git a/build/all.gyp b/build/all.gyp index d0cef6c..255a35c 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -833,6 +833,7 @@ '../base/base.gyp:base_unittests_apk', '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests_apk', '../cc/cc_tests.gyp:cc_unittests_apk', + '../components/components_tests.gyp:components_browsertests_apk', '../components/components_tests.gyp:components_unittests_apk', '../content/content_shell_and_tests.gyp:content_browsertests_apk', '../content/content_shell_and_tests.gyp:content_gl_tests_apk', diff --git a/build/android/pylib/constants/__init__.py b/build/android/pylib/constants/__init__.py index fb5ce6d..6e92f6d 100644 --- a/build/android/pylib/constants/__init__.py +++ b/build/android/pylib/constants/__init__.py @@ -106,6 +106,13 @@ PACKAGE_INFO = { '/data/local/tmp/chrome-native-tests-command-line', None, None), + 'components_browsertests': PackageInfo( + 'org.chromium.components_browsertests_apk', + ('org.chromium.components_browsertests_apk' + + '.ComponentsBrowserTestsActivity'), + '/data/local/tmp/components-browser-tests-command-line', + None, + None), 'content_browsertests': PackageInfo( 'org.chromium.content_browsertests_apk', 'org.chromium.content_browsertests_apk.ContentBrowserTestsActivity', diff --git a/build/android/pylib/gtest/gtest_config.py b/build/android/pylib/gtest/gtest_config.py index 8608ed7..6ce0fb1 100644 --- a/build/android/pylib/gtest/gtest_config.py +++ b/build/android/pylib/gtest/gtest_config.py @@ -6,6 +6,7 @@ # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ + 'components_browsertests', 'content_gl_tests', 'heap_profiler_unittests', 'devtools_bridge_tests', diff --git a/build/android/pylib/gtest/gtest_test_instance.py b/build/android/pylib/gtest/gtest_test_instance.py index 186b8fc..b6f83b3 100644 --- a/build/android/pylib/gtest/gtest_test_instance.py +++ b/build/android/pylib/gtest/gtest_test_instance.py @@ -92,9 +92,10 @@ class GtestTestInstance(test_instance.TestInstance): raise ValueError('Platform mode currently supports only 1 gtest suite') self._suite = args.suite_name[0] - if self._suite == 'content_browsertests': - error_func('content_browsertests are not currently supported ' - 'in platform mode.') + if (self._suite == 'content_browsertests' or + self._suite == 'components_browsertests'): + error_func('%s are not currently supported ' + 'in platform mode.' % self._suite) self._apk_path = os.path.join( constants.GetOutDirectory(), 'apks', '%s.apk' % self._suite) else: diff --git a/build/android/pylib/gtest/local_device_gtest_run.py b/build/android/pylib/gtest/local_device_gtest_run.py index ff12d82..fd143d6 100644 --- a/build/android/pylib/gtest/local_device_gtest_run.py +++ b/build/android/pylib/gtest/local_device_gtest_run.py @@ -30,7 +30,8 @@ _MAX_SHARD_SIZE = 256 # TODO(jbudorick): Move this up to the test instance if the net test server is # handled outside of the APK for the remote_device environment. _SUITE_REQUIRES_TEST_SERVER_SPAWNER = [ - 'content_unittests', 'content_browsertests', 'net_unittests', 'unit_tests' + 'components_browsertests', 'content_unittests', 'content_browsertests', + 'net_unittests', 'unit_tests' ] class _ApkDelegate(object): diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py index 1b882ca..44662d0 100644 --- a/build/android/pylib/gtest/setup.py +++ b/build/android/pylib/gtest/setup.py @@ -31,6 +31,7 @@ ISOLATE_FILE_PATHS = { 'third_party/WebKit/Source/platform/heap/BlinkHeapUnitTests.isolate', 'breakpad_unittests': 'breakpad/breakpad_unittests.isolate', 'cc_perftests': 'cc/cc_perftests.isolate', + 'components_browsertests': 'components/components_browsertests.isolate', 'components_unittests': 'components/components_unittests.isolate', 'content_browsertests': 'content/content_browsertests.isolate', 'content_unittests': 'content/content_unittests.isolate', @@ -236,7 +237,8 @@ def Setup(test_options, devices): tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) # Coalesce unit tests into a single test per device - if test_options.suite_name != 'content_browsertests': + if (test_options.suite_name != 'content_browsertests' and + test_options.suite_name != 'components_browsertests'): num_devices = len(devices) tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] tests = [t for t in tests if t] diff --git a/build/android/pylib/gtest/test_package_apk.py b/build/android/pylib/gtest/test_package_apk.py index 3e579d2..8da3c74 100644 --- a/build/android/pylib/gtest/test_package_apk.py +++ b/build/android/pylib/gtest/test_package_apk.py @@ -34,6 +34,10 @@ class TestPackageApk(TestPackage): self.suite_path = os.path.join( constants.GetOutDirectory(), 'apks', '%s.apk' % suite_name) self._package_info = constants.PACKAGE_INFO['content_browsertests'] + elif suite_name == 'components_browsertests': + self.suite_path = os.path.join( + constants.GetOutDirectory(), 'apks', '%s.apk' % suite_name) + self._package_info = constants.PACKAGE_INFO['components_browsertests'] else: self.suite_path = os.path.join( constants.GetOutDirectory(), '%s_apk' % suite_name, @@ -90,6 +94,15 @@ class TestPackageApk(TestPackage): # TODO(jbudorick) Handle this exception appropriately once the # conversions are done. pass + elif self.suite_name == 'components_browsertests': + try: + device.RunShellCommand( + 'rm -r %s/components_shell' % device.GetExternalStoragePath(), + timeout=60 * 2) + except device_errors.CommandFailedError: + # TODO(jbudorick) Handle this exception appropriately once the + # conversions are done. + pass #override def CreateCommandLineFileOnDevice(self, device, test_filter, test_arguments): diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py index b561058..4926388 100644 --- a/build/android/pylib/gtest/test_runner.py +++ b/build/android/pylib/gtest/test_runner.py @@ -34,6 +34,7 @@ _INFRA_STDOUT_TIMEOUT = 20 * 60 def _TestSuiteRequiresMockTestServer(suite_name): """Returns True if the test suite requires mock test server.""" tests_require_net_test_server = ['unit_tests', 'net_unittests', + 'components_browsertests', 'content_unittests', 'content_browsertests'] return (suite_name in |