diff options
author | frankf@chromium.org <frankf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 20:10:42 +0000 |
---|---|---|
committer | frankf@chromium.org <frankf@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-23 20:10:42 +0000 |
commit | db3bec2758e72921ecfb14cb37359d37f6ed0a3b (patch) | |
tree | 6b78ad2918eaa812e8cb101b8860f021a8f899d7 /build | |
parent | 56e352554edf141b3de2ba0eedee93687400f912 (diff) | |
download | chromium_src-db3bec2758e72921ecfb14cb37359d37f6ed0a3b.zip chromium_src-db3bec2758e72921ecfb14cb37359d37f6ed0a3b.tar.gz chromium_src-db3bec2758e72921ecfb14cb37359d37f6ed0a3b.tar.bz2 |
[Android] webkit_unit_tests should use isolate file.
Also, remove --webkit/--out-directory options which were
used to run tests from a webkit checkout
BUG=263019, 263021
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/19971005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213205 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/android/pylib/browsertests/setup.py | 4 | ||||
-rw-r--r-- | build/android/pylib/gtest/setup.py | 6 | ||||
-rw-r--r-- | build/android/pylib/gtest/test_runner.py | 30 | ||||
-rwxr-xr-x | build/android/test_runner.py | 14 |
4 files changed, 7 insertions, 47 deletions
diff --git a/build/android/pylib/browsertests/setup.py b/build/android/pylib/browsertests/setup.py index 6e5bac9..82c6b11 100644 --- a/build/android/pylib/browsertests/setup.py +++ b/build/android/pylib/browsertests/setup.py @@ -19,7 +19,7 @@ from pylib.utils import report_results def Setup(test_arguments, timeout, cleanup_test_files, tool, build_type, - webkit, push_deps, gtest_filter): + push_deps, gtest_filter): """Create the test runner factory and tests. Args: @@ -28,7 +28,6 @@ def Setup(test_arguments, timeout, cleanup_test_files, tool, build_type, cleanup_test_files: Whether or not to cleanup test files on device. tool: Name of the Valgrind tool. build_type: 'Release' or 'Debug'. - webkit: Whether the suite is being run from a WebKit checkout. push_deps: If True, push all dependencies to the device. gtest_filter: filter for tests. @@ -55,7 +54,6 @@ def Setup(test_arguments, timeout, cleanup_test_files, tool, build_type, cleanup_test_files, tool, build_type, - webkit, push_deps, constants.BROWSERTEST_TEST_PACKAGE_NAME, constants.BROWSERTEST_TEST_ACTIVITY_NAME, diff --git a/build/android/pylib/gtest/setup.py b/build/android/pylib/gtest/setup.py index 7e1fe88..a246833 100644 --- a/build/android/pylib/gtest/setup.py +++ b/build/android/pylib/gtest/setup.py @@ -37,6 +37,8 @@ _ISOLATE_FILE_PATHS = { 'net_unittests': 'net/net_unittests.isolate', 'ui_unittests': 'ui/ui_unittests.isolate', 'unit_tests': 'chrome/unit_tests.isolate', + 'webkit_unit_tests': + 'third_party/WebKit/Source/web/WebKitUnitTests.isolate', } # Used for filtering large data deps at a finer grain than what's allowed in @@ -288,7 +290,7 @@ def GetTestsFiltered(suite_name, gtest_filter, runner_factory, devices): def Setup(use_exe_test_runner, suite_name, test_arguments, timeout, - cleanup_test_files, tool, build_type, webkit, push_deps, + cleanup_test_files, tool, build_type, push_deps, gtest_filter): """Create the test runner factory and tests. @@ -300,7 +302,6 @@ def Setup(use_exe_test_runner, suite_name, test_arguments, timeout, cleanup_test_files: Whether or not to cleanup test files on device. tool: Name of the Valgrind tool. build_type: 'Release' or 'Debug'. - webkit: Whether the suite is being run from a WebKit checkout. push_deps: If True, push all dependencies to the device. gtest_filter: Filter for tests. @@ -328,7 +329,6 @@ def Setup(use_exe_test_runner, suite_name, test_arguments, timeout, cleanup_test_files, tool, build_type, - webkit, push_deps, constants.GTEST_TEST_PACKAGE_NAME, constants.GTEST_TEST_ACTIVITY_NAME, diff --git a/build/android/pylib/gtest/test_runner.py b/build/android/pylib/gtest/test_runner.py index 3a1463c..da422c3 100644 --- a/build/android/pylib/gtest/test_runner.py +++ b/build/android/pylib/gtest/test_runner.py @@ -29,7 +29,7 @@ def _TestSuiteRequiresMockTestServer(suite_basename): class TestRunner(base_test_runner.BaseTestRunner): def __init__(self, device, suite_name, test_arguments, timeout, cleanup_test_files, tool_name, build_type, - in_webkit_checkout, push_deps, test_apk_package_name=None, + push_deps, test_apk_package_name=None, test_activity_name=None, command_line_file=None): """Single test suite attached to a single device. @@ -41,7 +41,6 @@ class TestRunner(base_test_runner.BaseTestRunner): cleanup_test_files: Whether or not to cleanup test files on device. tool_name: Name of the Valgrind tool. build_type: 'Release' or 'Debug'. - in_webkit_checkout: Whether the suite is being run from a WebKit checkout. push_deps: If True, push all dependencies to the device. test_apk_package_name: Apk package name for tests running in APKs. test_activity_name: Test activity to invoke for APK tests. @@ -50,7 +49,6 @@ class TestRunner(base_test_runner.BaseTestRunner): super(TestRunner, self).__init__(device, tool_name, build_type, push_deps, cleanup_test_files) self._test_arguments = test_arguments - self.in_webkit_checkout = in_webkit_checkout if timeout == 0: timeout = 60 # On a VM (e.g. chromium buildbots), this timeout is way too small. @@ -88,10 +86,6 @@ class TestRunner(base_test_runner.BaseTestRunner): def PushDataDeps(self): self.adb.WaitForSdCardReady(20) self.tool.CopyFiles() - if self.test_package.suite_basename == 'webkit_unit_tests': - self.PushWebKitUnitTestsData() - return - if os.path.exists(constants.ISOLATE_DEPS_DIR): device_dir = self.adb.GetExternalStorage() # TODO(frankf): linux_dumper_unittest_helper needs to be in the same dir @@ -103,28 +97,6 @@ class TestRunner(base_test_runner.BaseTestRunner): os.path.join(constants.ISOLATE_DEPS_DIR, p), os.path.join(device_dir, p)) - def PushWebKitUnitTestsData(self): - """Pushes the webkit_unit_tests data files to the device. - - The path of this directory is different when the suite is being run as - part of a WebKit check-out. - """ - webkit_src = os.path.join(constants.DIR_SOURCE_ROOT, 'third_party', - 'WebKit') - if self.in_webkit_checkout: - webkit_src = os.path.join(constants.DIR_SOURCE_ROOT, '..', '..', '..') - - self.adb.PushIfNeeded( - os.path.join(webkit_src, 'Source/web/tests/data'), - os.path.join( - self.adb.GetExternalStorage(), - 'third_party/WebKit/Source/web/tests/data')) - self.adb.PushIfNeeded( - os.path.join(constants.DIR_SOURCE_ROOT, - 'third_party/hyphen/hyph_en_US.dic'), - os.path.join(self.adb.GetExternalStorage(), - 'third_party/hyphen/hyph_en_US.dic')) - def _ParseTestOutput(self, p): """Process the test output. diff --git a/build/android/test_runner.py b/build/android/test_runner.py index f89fdb9..f50bc7c 100755 --- a/build/android/test_runner.py +++ b/build/android/test_runner.py @@ -54,9 +54,6 @@ def AddCommonOptions(option_parser): AddBuildTypeOption(option_parser) - option_parser.add_option('--out-directory', dest='out_directory', - help=('Path to the out/ directory, irrespective of ' - 'the build type. Only for non-Chromium uses.')) option_parser.add_option('-c', dest='cleanup_test_files', help='Cleanup test files on the device after run', action='store_true') @@ -97,8 +94,6 @@ def AddCommonOptions(option_parser): def ProcessCommonOptions(options): """Processes and handles all common options.""" - if options.out_directory: - cmd_helper.OutDirectory.set(options.out_directory) run_tests_helper.SetLogLevel(options.verbose_count) @@ -111,10 +106,6 @@ def AddCoreGTestOptions(option_parser): help='googletest-style filter string.') option_parser.add_option('-a', '--test_arguments', dest='test_arguments', help='Additional arguments to pass to the test.') - # TODO(gkanwar): Possible deprecate this flag. Waiting on word from Peter - # Beverloo. - option_parser.add_option('--webkit', action='store_true', - help='Run the tests from a WebKit checkout.') option_parser.add_option('--exe', action='store_true', help='If set, use the exe test runner instead of ' 'the APK.') @@ -360,8 +351,7 @@ def _RunGTests(options, error_func): runner_factory, tests = gtest_setup.Setup( options.exe, suite_name, options.test_arguments, options.timeout, options.cleanup_test_files, options.tool, - options.build_type, options.webkit, options.push_deps, - options.test_filter) + options.build_type, options.push_deps, options.test_filter) results, test_exit_code = test_dispatcher.RunTests( tests, runner_factory, False, options.test_device, @@ -390,7 +380,7 @@ def _RunContentBrowserTests(options, error_func): """Subcommand of RunTestsCommands which runs content_browsertests.""" runner_factory, tests = browsertests_setup.Setup( options.test_arguments, options.timeout, options.cleanup_test_files, - options.tool, options.build_type, options.webkit, options.push_deps, + options.tool, options.build_type, options.push_deps, options.test_filter) # TODO(nileshagrawal): remove this abnormally long setup timeout once fewer |