Enable components_browsertests on Android
BUG=465351 Review URL: https://codereview.chromium.org/1075783002 Cr-Original-Commit-Position: refs/heads/master@{#326449} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 4ba34ff136727244ead91780152b3248fe7ce0fd
This commit is contained in:
Родитель
5873ebf6a6
Коммит
a56a53efba
1
all.gyp
1
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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче