WebKit Bugzilla
Attachment 348663 Details for
Bug 187916
: Add test-lldb-webkit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187916-20180831124143.patch (text/plain), 48.14 KB, created by
Daniel Bates
on 2018-08-31 12:41:44 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Daniel Bates
Created:
2018-08-31 12:41:44 PDT
Size:
48.14 KB
patch
obsolete
>Subversion Revision: 235554 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 80f80021a68e12e24f16a9af5327531709fd7655..01f3b23345a9936f85ee6556c82368a4111c341f 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,125 @@ >+2018-08-31 Daniel Bates <dabates@apple.com> >+ >+ Add test-lldb-webkit >+ https://bugs.webkit.org/show_bug.cgi?id=187916 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Extract out logic to build lldbWebKitTester and run LLDB tests from test-webkitpy into its >+ own test runner. This will help make it straightforward to add more tests for LLDB pretty- >+ printers, including pretty-printers for WebCore types, without requiring webkitpy developers >+ to build lldbWebKitTester and its dependencies. >+ >+ The test-lldb-webkit script uses the same output format as test-webkitpy. As a first iteration >+ it also shares the same multiprocess test runner machinery with test-webkitpy. Unlike test-webkitpy >+ all tests run in a the same process (serial) and there is no support for having both parallel >+ and serial tests because LLDB tests can only be run serially. A side effect of this design >+ change is that it is no longer necessary to demarcate tests that must be run serially from >+ tests can be run in parallel by prefixing test method names with "serial_test_" and "test_", >+ respectively. All test methods that are prefixed with "test_" will be run serially. >+ >+ * Scripts/build-lldbwebkittester: We only support building lldbWebKitTester on Mac for now. >+ Error out if this script is invoked for a non-Mac platform. >+ * Scripts/test-lldb-webkit: Added. >+ * Scripts/webkitpy/lldb_webkit_tests/__init__.py: Added. >+ * Scripts/webkitpy/lldb_webkit_tests/main.py: Added. >+ (main): >+ (Tester): >+ (Tester.__init__): >+ (Tester.add_tree): >+ (Tester.skip): >+ (Tester._parse_args): >+ (Tester.run): >+ (Tester._run_tests): >+ (Tester._check_imports): >+ (Tester._test_names): >+ (Tester._all_test_names): >+ (Tester._log_exception): >+ * Scripts/webkitpy/test/loader.py: Added; extracted from test/main.py. >+ (_Loader): >+ (_Loader.getTestCaseNames): >+ (_Loader.getTestCaseNames.isTestMethod): >+ * Scripts/webkitpy/test/main.py: >+ (main): >+ (Tester._parse_args): >+ (Tester.run): >+ (Tester._run_tests): >+ (Tester._log_exception): >+ (_build_lldb_webkit_tester): Deleted. >+ (_print_results_as_json): Deleted. Moved to printer.py and renamed to write_results_as_json(). >+ (_print_results_as_json.result_dict_from_tuple): Deleted. >+ (_Loader): Deleted; moved to loader.py. >+ (_Loader.getTestCaseNames): Deleted. >+ (_Loader.getTestCaseNames.isTestMethod): Deleted. >+ * Scripts/webkitpy/test/printer.py: >+ (write_results_as_json): Moved from test/main.py and formerly named _print_results_as_json(). >+ (write_results_as_json.make_dict_from_tuple): >+ * lldb/dump_class_layout_unittest.py: >+ (TestDumpClassLayout.shouldSkip): >+ (TestDumpClassLayout.setUpClass): >+ (TestDumpClassLayout.test_BasicClassLayout): >+ (test_PaddingBetweenClassMembers): >+ (test_BoolPaddingClass): >+ (test_ClassWithEmptyClassMembers): >+ (test_SimpleVirtualClass): >+ (test_VirtualClassWithNonVirtualBase): >+ (test_InterleavedVirtualNonVirtual): >+ (test_ClassWithTwoVirtualBaseClasses): >+ (test_ClassWithVirtualInheritance): >+ (test_ClassWithInheritanceAndClassMember): >+ (test_DerivedClassWithIndirectVirtualInheritance): >+ (test_ClassWithClassMembers): >+ (test_ClassWithBitfields): >+ (test_ClassWithPaddedBitfields): >+ (test_MemberHasBitfieldPadding): >+ (test_InheritsFromClassWithPaddedBitfields): >+ (TestDumpClassLayout.serial_test_BasicClassLayout): Deleted. >+ (serial_test_PaddingBetweenClassMembers): Deleted. >+ (serial_test_BoolPaddingClass): Deleted. >+ (serial_test_ClassWithEmptyClassMembers): Deleted. >+ (serial_test_SimpleVirtualClass): Deleted. >+ (serial_test_VirtualClassWithNonVirtualBase): Deleted. >+ (serial_test_InterleavedVirtualNonVirtual): Deleted. >+ (serial_test_ClassWithTwoVirtualBaseClasses): Deleted. >+ (serial_test_ClassWithVirtualInheritance): Deleted. >+ (serial_test_ClassWithInheritanceAndClassMember): Deleted. >+ (serial_test_DerivedClassWithIndirectVirtualInheritance): Deleted. >+ (serial_test_ClassWithClassMembers): Deleted. >+ (serial_test_ClassWithBitfields): Deleted. >+ (serial_test_ClassWithPaddedBitfields): Deleted. >+ (serial_test_MemberHasBitfieldPadding): Deleted. >+ (serial_test_InheritsFromClassWithPaddedBitfields): Deleted. >+ * lldb/lldb_webkit_unittest.py: >+ (LLDBDebugSession.setup): >+ (TestSummaryProviders): >+ (TestSummaryProviders.shouldSkip): Added. >+ (TestSummaryProviders.test_WTFStringImpl_SummaryProvider_null_string): >+ (TestSummaryProviders.test_WTFStringImpl_SummaryProvider_empty_string): >+ (TestSummaryProviders.test_WTFStringImpl_SummaryProvider_8bit_string): >+ (TestSummaryProviders.test_WTFStringImpl_SummaryProvider_16bit_string): >+ (TestSummaryProviders.test_WTFString_SummaryProvider_null_string): >+ (TestSummaryProviders.test_WTFString_SummaryProvider_empty_string): >+ (TestSummaryProviders.test_WTFString_SummaryProvider_8bit_string): >+ (TestSummaryProviders.test_WTFString_SummaryProvider_16bit_string): >+ (TestSummaryProviders.test_WTFVectorProvider_empty_vector): >+ (TestSummaryProviders.test_WTFVectorProvider_vector_size_and_capacity): >+ (TestSummaryProviders.test_WTFHashMap_tablesize_and_size): >+ (TestSummaryProviders.test_WTFHashMap_of_vectors_tablesize_and_size): >+ (TestSummaryProviders.test_WTFHashSet_tablesize_and_size): >+ (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_empty_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFString_SummaryProvider_null_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFString_SummaryProvider_empty_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): Deleted. >+ (TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector): Deleted. >+ (TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity): Deleted. >+ (TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size): Deleted. >+ (TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size): Deleted. >+ (TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size): Deleted. >+ > 2018-08-31 Daniel Bates <dabates@apple.com> > > lldb-webkit: KeyError thrown for OptionSet with invalid value >diff --git a/Tools/Scripts/build-lldbwebkittester b/Tools/Scripts/build-lldbwebkittester >index 79d9c6a6ec9500eb020e262707d2a315a58d165e..bf56f34613eab85a95a2331e167765a050e458c6 100755 >--- a/Tools/Scripts/build-lldbwebkittester >+++ b/Tools/Scripts/build-lldbwebkittester >@@ -60,6 +60,11 @@ checkRequiredSystemConfig(); > setConfiguration(); > chdirWebKit(); > >+if (!isAppleMacWebKit()) { >+ print STDERR "lldbWebKitTester is currently only supported on Mac.\n"; >+ exit 1; >+} >+ > my @xcodeOptions = XcodeOptions(); > > buildProjectOrDie("Source/bmalloc", "bmalloc"); >diff --git a/Tools/Scripts/test-lldb-webkit b/Tools/Scripts/test-lldb-webkit >new file mode 100755 >index 0000000000000000000000000000000000000000..a97a06ecdb094ebe349f75062b05f3443cc2dac8 >--- /dev/null >+++ b/Tools/Scripts/test-lldb-webkit >@@ -0,0 +1,26 @@ >+#!/usr/bin/env python >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+from webkitpy.common import multiprocessing_bootstrap >+ >+multiprocessing_bootstrap.run('webkitpy', 'lldb_webkit_tests', 'main.py') >diff --git a/Tools/Scripts/webkitpy/lldb_webkit_tests/__init__.py b/Tools/Scripts/webkitpy/lldb_webkit_tests/__init__.py >new file mode 100644 >index 0000000000000000000000000000000000000000..ef65bee5bb77e96ebc7cd9c47640690fbda8ac19 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/lldb_webkit_tests/__init__.py >@@ -0,0 +1 @@ >+# Required for Python to search this directory for module files >diff --git a/Tools/Scripts/webkitpy/lldb_webkit_tests/main.py b/Tools/Scripts/webkitpy/lldb_webkit_tests/main.py >new file mode 100644 >index 0000000000000000000000000000000000000000..ba99cc6c62c1405f73574a0f8e0056dbca883bb6 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/lldb_webkit_tests/main.py >@@ -0,0 +1,218 @@ >+# Copyright (C) 2012 Google, Inc. >+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+"""unit testing code for lldb-webkit.""" >+ >+import StringIO >+import logging >+import multiprocessing >+import optparse >+import os >+import sys >+import time >+import traceback >+import unittest >+ >+from webkitpy.common.system.logutils import configure_logging >+from webkitpy.common.system.executive import Executive, ScriptError >+from webkitpy.common.system.filesystem import FileSystem >+from webkitpy.common.system.systemhost import SystemHost >+from webkitpy.port.config import Config >+from webkitpy.test.finder import Finder >+from webkitpy.test.loader import _Loader >+from webkitpy.test.printer import Printer, write_results_as_json >+from webkitpy.test.runner import Runner, unit_test_name >+ >+_log = logging.getLogger(__name__) >+ >+_host = SystemHost() >+_webkit_root = None >+ >+ >+def main(): >+ global _webkit_root >+ configure_logging(logger=_log) >+ >+ up = os.path.dirname >+ _webkit_root = up(up(up(up(up(os.path.abspath(__file__)))))) >+ >+ tester = Tester() >+ >+ lldb_python_directory = _host.path_to_lldb_python_directory() >+ if os.path.isdir(lldb_python_directory): >+ if lldb_python_directory not in sys.path: >+ sys.path.append(lldb_python_directory) >+ tester.add_tree(os.path.join(_webkit_root, 'Tools', 'lldb')) >+ else: >+ _log.error("Could not find path to lldb.py '{}'.".format(lldb_python_directory)) >+ return False >+ >+ return not tester.run() >+ >+ >+class Tester(object): >+ def __init__(self, filesystem=None): >+ self.finder = Finder(filesystem or FileSystem()) >+ self.printer = Printer(sys.stderr) >+ self._options = None >+ >+ def add_tree(self, top_directory, starting_subdirectory=None): >+ self.finder.add_tree(top_directory, starting_subdirectory) >+ >+ def skip(self, names, reason, bugid): >+ self.finder.skip(names, reason, bugid) >+ >+ def _parse_args(self, argv=None): >+ parser = optparse.OptionParser(usage='usage: %prog [options] [args...]') >+ >+ configuration_group = optparse.OptionGroup(parser, 'Configuration options') >+ configuration_group.add_option('--debug', action='store_const', const='Debug', dest='configuration', >+ help='Set the configuration to Debug') >+ configuration_group.add_option('--release', action='store_const', const='Release', dest='configuration', >+ help='Set the configuration to Release') >+ parser.add_option_group(configuration_group) >+ >+ parser.add_option('--build', action='store_true', dest='should_build', default=True, >+ help='Check to ensure the lldbWebKitTester build is up-to-date (default).'), >+ parser.add_option('--no-build', action='store_false', dest='should_build', >+ help="Don't check to see if the lldbWebKitTester build is up-to-date."), >+ parser.add_option('-p', '--pass-through', action='store_true', default=False, >+ help='be debugger friendly by passing captured output through to the system') >+ parser.add_option('-q', '--quiet', action='store_true', default=False, >+ help='run quietly (errors, warnings, and progress only)') >+ parser.add_option('-t', '--timing', action='store_true', default=False, >+ help='display per-test execution time (implies --verbose)') >+ parser.add_option('-v', '--verbose', action='count', default=0, >+ help='verbose output (specify once for individual test results, twice for debug messages)') >+ parser.add_option('--json-output', action='store', type='string', dest='json_file_name', >+ help='Create a file at specified path, listing test results in JSON format.') >+ >+ parser.epilog = ('[args...] is an optional list of modules, test_classes, or individual tests. ' >+ 'If no args are given, all the tests will be run.') >+ >+ return parser.parse_args(argv) >+ >+ def run(self): >+ self._options, args = self._parse_args() >+ self.printer.configure(self._options) >+ >+ self.finder.clean_trees() >+ >+ names = self.finder.find_names(args, True) # Find all tests. >+ if not names: >+ _log.error('No tests to run') >+ return False >+ >+ return self._run_tests(names) >+ >+ def _run_tests(self, names): >+ # Make sure PYTHONPATH is set up properly. >+ sys.path = self.finder.additional_paths(sys.path) + sys.path >+ >+ # We autoinstall everything up so that we can run tests concurrently >+ # and not have to worry about autoinstalling packages concurrently. >+ self.printer.write_update("Checking autoinstalled packages ...") >+ from webkitpy.thirdparty import autoinstall_everything >+ autoinstall_everything() >+ >+ config = Config(_host.executive, self.finder.filesystem) >+ configuration_to_use = self._options.configuration or config.default_configuration() >+ if self._options.should_build: >+ self.printer.write_update('Building lldbWebKitTester ...') >+ build_lldbwebkittester = os.path.join(_webkit_root, 'Tools', 'Scripts', 'build-lldbwebkittester') >+ try: >+ _host.executive.run_and_throw_if_fail([build_lldbwebkittester, config.flag_for_configuration(configuration_to_use)], quiet=(not bool(self._options.verbose))) >+ except ScriptError as e: >+ _log.error(e.message_with_output(output_limit=None)) >+ return False >+ os.environ['LLDB_WEBKIT_TESTER_EXECUTABLE'] = str(os.path.join(config.build_directory(configuration_to_use), 'lldbWebKitTester')) >+ if not self.finder.filesystem.exists(os.environ['LLDB_WEBKIT_TESTER_EXECUTABLE']): >+ _log.error('Failed to find lldbWebKitTester.') >+ return False >+ >+ self.printer.write_update("Checking imports ...") >+ if not self._check_imports(names): >+ return False >+ >+ self.printer.write_update("Finding the individual test methods ...") >+ loader = _Loader() >+ tests_to_run = self._test_names(loader, names) >+ >+ self.printer.write_update("Running the tests ...") >+ self.printer.num_tests = len(tests_to_run) >+ start = time.time() >+ test_runner = Runner(self.printer, loader) >+ >+ # Run the tests serially (one child process) to avoid errors emitted to standard error of the form: >+ # objc[76794]: +[__MDQuery initialize] may have been in progress in another thread when fork() was called. >+ # We cannot safely call it or ignore it in the fork() child process. Crashing instead. >+ test_runner.run(tests_to_run, 1) >+ >+ self.printer.print_result(time.time() - start) >+ >+ if self._options.json_file_name: >+ self._options.json_file_name = os.path.abspath(self._options.json_file_name) >+ with open(self._options.json_file_name, 'w') as json_file: >+ write_results_as_json(json_file, tests_to_run, test_runner.failures, test_runner.errors) >+ >+ return not self.printer.num_errors and not self.printer.num_failures >+ >+ def _check_imports(self, names): >+ for name in names: >+ if self.finder.is_module(name): >+ # If we failed to load a name and it looks like a module, >+ # try importing it directly, because loadTestsFromName() >+ # produces lousy error messages for bad modules. >+ try: >+ __import__(name) >+ except ImportError: >+ _log.fatal('Failed to import %s:' % name) >+ self._log_exception() >+ return False >+ return True >+ >+ def _test_names(self, loader, names): >+ tests = [] >+ loader.test_method_prefixes = ['test_'] >+ for name in names: >+ tests.extend(self._all_test_names(loader.loadTestsFromName(name, None))) >+ return tests >+ >+ def _all_test_names(self, suite): >+ names = [] >+ if hasattr(suite, '_tests'): >+ for t in suite._tests: >+ names.extend(self._all_test_names(t)) >+ else: >+ names.append(unit_test_name(suite)) >+ return names >+ >+ def _log_exception(self): >+ s = StringIO.StringIO() >+ traceback.print_exc(file=s) >+ for l in s.buflist: >+ _log.error(' ' + l.rstrip()) >+ >+if __name__ == '__main__': >+ sys.exit(main()) >diff --git a/Tools/Scripts/webkitpy/test/loader.py b/Tools/Scripts/webkitpy/test/loader.py >new file mode 100644 >index 0000000000000000000000000000000000000000..5f836f630f40a296001a07cdf8960c24ffb20528 >--- /dev/null >+++ b/Tools/Scripts/webkitpy/test/loader.py >@@ -0,0 +1,48 @@ >+# Copyright (C) 2012 Google, Inc. >+# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+ >+import logging >+import unittest >+ >+_log = logging.getLogger(__name__) >+ >+ >+class _Loader(unittest.TestLoader): >+ test_method_prefixes = [] >+ >+ def getTestCaseNames(self, testCaseClass): >+ should_skip_class_method = getattr(testCaseClass, "shouldSkip", None) >+ if callable(should_skip_class_method): >+ if testCaseClass.shouldSkip(): >+ _log.info('Skipping tests in %s' % (testCaseClass.__name__)) >+ return [] >+ >+ def isTestMethod(attrname, testCaseClass=testCaseClass): >+ if not hasattr(getattr(testCaseClass, attrname), '__call__'): >+ return False >+ return (any(attrname.startswith(prefix) for prefix in self.test_method_prefixes)) >+ testFnNames = filter(isTestMethod, dir(testCaseClass)) >+ testFnNames.sort() >+ return testFnNames >diff --git a/Tools/Scripts/webkitpy/test/main.py b/Tools/Scripts/webkitpy/test/main.py >index 6a4bb5e342abf595137e896ab7c4865ba7af745a..7c7b340c6594c388037b2267bee130e9a67ac4af 100644 >--- a/Tools/Scripts/webkitpy/test/main.py >+++ b/Tools/Scripts/webkitpy/test/main.py >@@ -26,10 +26,8 @@ > > import StringIO > import itertools >-import json > import logging > import multiprocessing >-import operator > import optparse > import os > import sys >@@ -38,58 +36,30 @@ import traceback > import unittest > > from webkitpy.common.system.logutils import configure_logging >-from webkitpy.common.system.executive import Executive, ScriptError > from webkitpy.common.system.filesystem import FileSystem > from webkitpy.common.system.systemhost import SystemHost > from webkitpy.port.config import Config > from webkitpy.test.finder import Finder >-from webkitpy.test.printer import Printer >+from webkitpy.test.loader import _Loader >+from webkitpy.test.printer import Printer, write_results_as_json > from webkitpy.test.runner import Runner, unit_test_name > > _log = logging.getLogger(__name__) > >-_host = SystemHost() >-_webkit_root = None >- >- >-def _build_lldb_webkit_tester(configuration): >- if not _host.platform.is_mac(): >- _log.error('lldbWebKitTester is not supported on this platform.') >- return False >- config = Config(_host.executive, _host.filesystem) >- build_lldbwebkittester = os.path.join(_webkit_root, 'Tools', 'Scripts', 'build-lldbwebkittester') >- try: >- _host.executive.run_and_throw_if_fail([build_lldbwebkittester, config.flag_for_configuration(configuration or config.default_configuration())], quiet=True) >- except ScriptError as e: >- _log.error(e.message_with_output(output_limit=None)) >- return False >- return True >- >- > > def main(): >- global _webkit_root >+ global webkit_root > configure_logging(logger=_log) > > up = os.path.dirname >- _webkit_root = up(up(up(up(up(os.path.abspath(__file__)))))) >+ webkit_root = up(up(up(up(up(os.path.abspath(__file__)))))) > > tester = Tester() >- tester.add_tree(os.path.join(_webkit_root, 'Tools', 'Scripts'), 'webkitpy') >+ tester.add_tree(os.path.join(webkit_root, 'Tools', 'Scripts'), 'webkitpy') > > # There is no WebKit2 on Windows, so we don't need to run WebKit2 unittests on it. > if not (sys.platform.startswith('win') or sys.platform == 'cygwin'): >- tester.add_tree(os.path.join(_webkit_root, 'Source', 'WebKit', 'Scripts'), 'webkit') >- >- lldb_python_directory = _host.path_to_lldb_python_directory() >- if os.path.isdir(lldb_python_directory): >- if lldb_python_directory not in sys.path: >- sys.path.append(lldb_python_directory) >- tester.add_tree(os.path.join(_webkit_root, 'Tools', 'lldb')) >- will_run_lldb_webkit_tests = True >- else: >- _log.info("Skipping lldb_webkit tests; could not find path to lldb.py '{}'.".format(lldb_python_directory)) >- will_run_lldb_webkit_tests = False >+ tester.add_tree(os.path.join(webkit_root, 'Source', 'WebKit', 'Scripts'), 'webkit') > > tester.skip(('webkitpy.common.checkout.scm.scm_unittest',), 'are really, really, slow', 31818) > if sys.platform.startswith('win'): >@@ -104,23 +74,12 @@ def main(): > from google.appengine.dist import use_library > use_library('django', '1.2') > dev_appserver.fix_sys_path() >- tester.add_tree(os.path.join(_webkit_root, 'Tools', 'QueueStatusServer')) >+ tester.add_tree(os.path.join(webkit_root, 'Tools', 'QueueStatusServer')) > else: > _log.info('Skipping QueueStatusServer tests; the Google AppEngine Python SDK is not installed.') > >- return not tester.run(will_run_lldb_webkit_tests=will_run_lldb_webkit_tests) >- >- >-def _print_results_as_json(stream, all_test_names, failures, errors): >- def result_dict_from_tuple(result_tuple): >- return {'name': result_tuple[0], 'result': result_tuple[1]} >- >- results = {} >- results['failures'] = map(result_dict_from_tuple, sorted(failures, key=operator.itemgetter(0))) >- results['errors'] = map(result_dict_from_tuple, sorted(errors, key=operator.itemgetter(0))) >- results['passes'] = sorted(set(all_test_names) - set(map(operator.itemgetter(0), failures)) - set(map(operator.itemgetter(0), errors))) >+ return not tester.run() > >- json.dump(results, stream, separators=(',', ':')) > > > class Tester(object): >@@ -137,15 +96,6 @@ class Tester(object): > > def _parse_args(self, argv=None): > parser = optparse.OptionParser(usage='usage: %prog [options] [args...]') >- >- # Configuration options only effect the building of lldbWebKitTester. >- configuration_group = optparse.OptionGroup(parser, 'Configuration options') >- configuration_group.add_option('--debug', action='store_const', const='Debug', dest="configuration", >- help='Set the configuration to Debug') >- configuration_group.add_option('--release', action='store_const', const='Release', dest="configuration", >- help='Set the configuration to Release') >- parser.add_option_group(configuration_group) >- > parser.add_option('-a', '--all', action='store_true', default=False, > help='run all the tests') > parser.add_option('-c', '--coverage', action='store_true', default=False, >@@ -173,7 +123,7 @@ class Tester(object): > > return parser.parse_args(argv) > >- def run(self, will_run_lldb_webkit_tests=False): >+ def run(self): > self._options, args = self._parse_args() > self.printer.configure(self._options) > >@@ -184,9 +134,9 @@ class Tester(object): > _log.error('No tests to run') > return False > >- return self._run_tests(names, will_run_lldb_webkit_tests) >+ return self._run_tests(names) > >- def _run_tests(self, names, will_run_lldb_webkit_tests): >+ def _run_tests(self, names): > # Make sure PYTHONPATH is set up properly. > sys.path = self.finder.additional_paths(sys.path) + sys.path > >@@ -196,12 +146,6 @@ class Tester(object): > from webkitpy.thirdparty import autoinstall_everything > autoinstall_everything() > >- if will_run_lldb_webkit_tests: >- self.printer.write_update('Building lldbWebKitTester ...') >- if not _build_lldb_webkit_tester(configuration=self._options.configuration): >- _log.error('Failed to build lldbWebKitTester.') >- return False >- > if self._options.coverage: > _log.warning("Checking code coverage, so running things serially") > self._options.child_processes = 1 >@@ -228,12 +172,12 @@ class Tester(object): > self.printer.print_result(time.time() - start) > > if self._options.json: >- _print_results_as_json(sys.stdout, itertools.chain(parallel_tests, serial_tests), test_runner.failures, test_runner.errors) >+ write_results_as_json(sys.stdout, itertools.chain(parallel_tests, serial_tests), test_runner.failures, test_runner.errors) > > if self._options.json_file_name: > self._options.json_file_name = os.path.abspath(self._options.json_file_name) > with open(self._options.json_file_name, 'w') as json_file: >- _print_results_as_json(json_file, itertools.chain(parallel_tests, serial_tests), test_runner.failures, test_runner.errors) >+ write_results_as_json(json_file, itertools.chain(parallel_tests, serial_tests), test_runner.failures, test_runner.errors) > > if self._options.coverage: > cov.stop() >@@ -296,24 +240,5 @@ class Tester(object): > _log.error(' ' + l.rstrip()) > > >-class _Loader(unittest.TestLoader): >- test_method_prefixes = [] >- >- def getTestCaseNames(self, testCaseClass): >- should_skip_class_method = getattr(testCaseClass, "shouldSkip", None) >- if callable(should_skip_class_method): >- if testCaseClass.shouldSkip(): >- _log.info('Skipping tests in %s' % (testCaseClass.__name__)) >- return [] >- >- def isTestMethod(attrname, testCaseClass=testCaseClass): >- if not hasattr(getattr(testCaseClass, attrname), '__call__'): >- return False >- return (any(attrname.startswith(prefix) for prefix in self.test_method_prefixes)) >- testFnNames = filter(isTestMethod, dir(testCaseClass)) >- testFnNames.sort() >- return testFnNames >- >- > if __name__ == '__main__': > sys.exit(main()) >diff --git a/Tools/Scripts/webkitpy/test/printer.py b/Tools/Scripts/webkitpy/test/printer.py >index d03642868271f3c87dea75acce13af5cd599102f..479fc26f4ec8630c402d49e66a2cba769a164fbb 100644 >--- a/Tools/Scripts/webkitpy/test/printer.py >+++ b/Tools/Scripts/webkitpy/test/printer.py >@@ -1,5 +1,6 @@ > # Copyright (C) 2012 Google, Inc. > # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) >+# Copyright (C) 2018 Apple Inc. All rights reserved. > # > # Redistribution and use in source and binary forms, with or without > # modification, are permitted provided that the following conditions >@@ -22,7 +23,9 @@ > # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > > import StringIO >+import json > import logging >+import operator > > from webkitpy.common.system import outputcapture > from webkitpy.common.system.systemhost import SystemHost >@@ -32,6 +35,17 @@ from webkitpy.tool.grammar import pluralize > _log = logging.getLogger(__name__) > > >+def write_results_as_json(stream, all_test_names, failures, errors): >+ def make_dict_from_tuple(result_tuple): >+ return {'name': result_tuple[0], 'result': result_tuple[1]} >+ >+ results = {} >+ results['failures'] = map(make_dict_from_tuple, sorted(failures, key=operator.itemgetter(0))) >+ results['errors'] = map(make_dict_from_tuple, sorted(errors, key=operator.itemgetter(0))) >+ results['passes'] = sorted(set(all_test_names) - set(map(operator.itemgetter(0), failures)) - set(map(operator.itemgetter(0), errors))) >+ json.dump(results, stream, separators=(',', ':')) >+ >+ > class Printer(object): > def __init__(self, stream, options=None): > self.stream = stream >diff --git a/Tools/lldb/dump_class_layout_unittest.py b/Tools/lldb/dump_class_layout_unittest.py >index 10427b05c4c8ce4b827107990cc632a6fc0c973b..0bd0d1185a52fe4910d8e7837810279e8b1d9172 100755 >--- a/Tools/lldb/dump_class_layout_unittest.py >+++ b/Tools/lldb/dump_class_layout_unittest.py >@@ -30,15 +30,11 @@ import os > import sys > import unittest > >-from webkitpy.common.system.systemhost import SystemHost >-from webkitpy.port.config import Config >- > from lldb_dump_class_layout import LLDBDebuggerInstance, ClassLayoutBase >- >-_host = SystemHost() >+from webkitpy.common.system.systemhost import SystemHost > > # Run these tests with ./Tools/Scripts/test-webkitpy dump_class_layout_unittest >-# Run a single test with e.g. ./Tools/Scripts/test-webkitpy dump_class_layout_unittest.TestDumpClassLayout.serial_test_ClassWithUniquePtrs >+# Run a single test with e.g. ./Tools/Scripts/test-webkitpy dump_class_layout_unittest.TestDumpClassLayout.test_ClassWithUniquePtrs > # Compare with clang's output: clang++ -Xclang -fdump-record-layouts DumpClassLayoutTesting.cpp > > debugger_instance = None >@@ -52,16 +48,13 @@ def destroy_cached_debug_session(): > class TestDumpClassLayout(unittest.TestCase): > @classmethod > def shouldSkip(cls): >- return not _host.platform.is_mac() >+ return not SystemHost().platform.is_mac() > > @classmethod > def setUpClass(cls): > global debugger_instance > if not debugger_instance: >- LLDB_WEBKIT_TESTER_NAME = 'lldbWebKitTester' >- >- config = Config(_host.executive, _host.filesystem) >- lldbWebKitTesterExecutable = os.path.join(config.build_directory(config.default_configuration()), LLDB_WEBKIT_TESTER_NAME) >+ lldbWebKitTesterExecutable = str(os.environ['LLDB_WEBKIT_TESTER_EXECUTABLE']) > > architecture = 'x86_64' > debugger_instance = LLDBDebuggerInstance(lldbWebKitTesterExecutable, architecture) >@@ -73,7 +66,7 @@ class TestDumpClassLayout(unittest.TestCase): > self.maxDiff = None > self.addTypeEqualityFunc(str, self.assertMultiLineEqual) > >- def serial_test_BasicClassLayout(self): >+ def test_BasicClassLayout(self): > EXPECTED_RESULT = """ +0 < 8> BasicClassLayout > +0 < 4> int intMember > +4 < 1> bool boolMember >@@ -84,7 +77,7 @@ Padding percentage: 37.50 %""" > actual_layout = debugger_instance.layout_for_classname('BasicClassLayout') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_PaddingBetweenClassMembers(self): >+ def test_PaddingBetweenClassMembers(self): > EXPECTED_RESULT = """ +0 < 16> PaddingBetweenClassMembers > +0 < 8> BasicClassLayout basic1 > +0 < 4> int intMember >@@ -100,7 +93,7 @@ Padding percentage: 37.50 %""" > actual_layout = debugger_instance.layout_for_classname('PaddingBetweenClassMembers') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_BoolPaddingClass(self): >+ def test_BoolPaddingClass(self): > EXPECTED_RESULT = """ +0 < 12> BoolPaddingClass > +0 < 1> bool bool1 > +1 < 1> bool bool2 >@@ -116,7 +109,7 @@ Padding percentage: 33.33 %""" > actual_layout = debugger_instance.layout_for_classname('BoolPaddingClass') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithEmptyClassMembers(self): >+ def test_ClassWithEmptyClassMembers(self): > EXPECTED_RESULT = """ +0 < 12> ClassWithEmptyClassMembers > +0 < 4> int intMember > +4 < 1> EmptyClass empty1 >@@ -131,7 +124,7 @@ Padding percentage: 25.00 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithEmptyClassMembers') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_SimpleVirtualClass(self): >+ def test_SimpleVirtualClass(self): > EXPECTED_RESULT = """ +0 < 24> SimpleVirtualClass > +0 < 8> __vtbl_ptr_type * _vptr > +8 < 4> int intMember >@@ -143,7 +136,7 @@ Padding percentage: 16.67 %""" > actual_layout = debugger_instance.layout_for_classname('SimpleVirtualClass') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_VirtualClassWithNonVirtualBase(self): >+ def test_VirtualClassWithNonVirtualBase(self): > EXPECTED_RESULT = """ +0 < 24> VirtualClassWithNonVirtualBase > +0 < 8> __vtbl_ptr_type * _vptr > +8 < 8> BasicClassLayout BasicClassLayout >@@ -157,7 +150,7 @@ Padding percentage: 12.50 %""" > actual_layout = debugger_instance.layout_for_classname('VirtualClassWithNonVirtualBase') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_InterleavedVirtualNonVirtual(self): >+ def test_InterleavedVirtualNonVirtual(self): > EXPECTED_RESULT = """ +0 < 16> InterleavedVirtualNonVirtual > +0 < 16> ClassWithVirtualBase ClassWithVirtualBase > +0 < 8> VirtualBaseClass VirtualBaseClass >@@ -171,7 +164,7 @@ Padding percentage: 37.50 %""" > actual_layout = debugger_instance.layout_for_classname('InterleavedVirtualNonVirtual') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithTwoVirtualBaseClasses(self): >+ def test_ClassWithTwoVirtualBaseClasses(self): > EXPECTED_RESULT = """ +0 < 24> ClassWithTwoVirtualBaseClasses > +0 < 8> VirtualBaseClass VirtualBaseClass > +0 < 8> __vtbl_ptr_type * _vptr >@@ -185,7 +178,7 @@ Padding percentage: 29.17 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithTwoVirtualBaseClasses') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithVirtualInheritance(self): >+ def test_ClassWithVirtualInheritance(self): > EXPECTED_RESULT = """ +0 < 64> ClassWithVirtualInheritance > +0 < 32> VirtualInheritingA VirtualInheritingA > +0 < 8> __vtbl_ptr_type * _vptr >@@ -210,7 +203,7 @@ Padding percentage: 28.12 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithVirtualInheritance') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithInheritanceAndClassMember(self): >+ def test_ClassWithInheritanceAndClassMember(self): > EXPECTED_RESULT = """ +0 < 80> ClassWithInheritanceAndClassMember > +0 < 32> VirtualInheritingA VirtualInheritingA > +0 < 8> __vtbl_ptr_type * _vptr >@@ -239,7 +232,7 @@ Padding percentage: 31.25 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithInheritanceAndClassMember') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_DerivedClassWithIndirectVirtualInheritance(self): >+ def test_DerivedClassWithIndirectVirtualInheritance(self): > EXPECTED_RESULT = """ +0 < 72> DerivedClassWithIndirectVirtualInheritance > +0 < 64> ClassWithVirtualInheritance ClassWithVirtualInheritance > +0 < 32> VirtualInheritingA VirtualInheritingA >@@ -266,7 +259,7 @@ Padding percentage: 25.00 %""" > actual_layout = debugger_instance.layout_for_classname('DerivedClassWithIndirectVirtualInheritance') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithClassMembers(self): >+ def test_ClassWithClassMembers(self): > EXPECTED_RESULT = """ +0 < 72> ClassWithClassMembers > +0 < 1> bool boolMember > +1 < 3> <PADDING: 3 bytes> >@@ -295,7 +288,7 @@ Padding percentage: 38.89 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithClassMembers') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithBitfields(self): >+ def test_ClassWithBitfields(self): > EXPECTED_RESULT = """ +0 < 12> ClassWithBitfields > +0 < 1> bool boolMember > +1 < :1> unsigned int bitfield1 : 1 >@@ -316,7 +309,7 @@ Padding percentage: 41.67 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithBitfields') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_ClassWithPaddedBitfields(self): >+ def test_ClassWithPaddedBitfields(self): > EXPECTED_RESULT = """ +0 < 16> ClassWithPaddedBitfields > +0 < 1> bool boolMember > +1 < :1> unsigned int bitfield1 : 1 >@@ -338,7 +331,7 @@ Padding percentage: 50.00 %""" > actual_layout = debugger_instance.layout_for_classname('ClassWithPaddedBitfields') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_MemberHasBitfieldPadding(self): >+ def test_MemberHasBitfieldPadding(self): > EXPECTED_RESULT = """ +0 < 24> MemberHasBitfieldPadding > +0 < 16> ClassWithPaddedBitfields bitfieldMember > +0 < 1> bool boolMember >@@ -364,7 +357,7 @@ Padding percentage: 62.50 %""" > actual_layout = debugger_instance.layout_for_classname('MemberHasBitfieldPadding') > self.assertEqual(EXPECTED_RESULT, actual_layout.as_string()) > >- def serial_test_InheritsFromClassWithPaddedBitfields(self): >+ def test_InheritsFromClassWithPaddedBitfields(self): > EXPECTED_RESULT = """ +0 < 16> InheritsFromClassWithPaddedBitfields > +0 < 16> ClassWithPaddedBitfields ClassWithPaddedBitfields > +0 < 1> bool boolMember >diff --git a/Tools/lldb/lldb_webkit_unittest.py b/Tools/lldb/lldb_webkit_unittest.py >index 865c97af57bf75026a4d77c2eb4515f0df1aa43a..dbe64b8da79da6f23bfedbe78535e101fd2fad8b 100755 >--- a/Tools/lldb/lldb_webkit_unittest.py >+++ b/Tools/lldb/lldb_webkit_unittest.py >@@ -31,11 +31,10 @@ import sys > import unittest > > from webkitpy.common.system.systemhost import SystemHost >-from webkitpy.port.config import Config > > # Run just the tests in this file with ./Tools/Scripts/test-webkitpy lldb_webkit_unittest > >-# We cache the lldb debug session state so that we don't create it again for each call to a serial_test_ method. >+# We cache the lldb debug session state so that we don't create it again for each call to a test_ method. > # We store it in a global variable so that we can delete this cached state on exit(3). > # FIXME: Remove this once test-webkitpy supports class and module fixtures (i.e. setUpClass()/setUpModule() > # are called exactly once per class/module). >@@ -53,17 +52,14 @@ def destroy_cached_debug_session(): > class LLDBDebugSession(object): > @classmethod > def setup(cls): >- LLDB_WEBKIT_TESTER_NAME = 'lldbWebKitTester' > BREAK_FOR_TESTING_FUNCTION_NAME = 'breakForTestingSummaryProviders' > > cls.sbDebugger = lldb.SBDebugger.Create() > cls.sbDebugger.SetAsync(False) > >- host = SystemHost() >- config = Config(host.executive, host.filesystem) >- cls.lldbWebKitTesterExecutable = os.path.join(config.build_directory(config.default_configuration()), LLDB_WEBKIT_TESTER_NAME) >+ cls.lldbWebKitTesterExecutable = str(os.environ['LLDB_WEBKIT_TESTER_EXECUTABLE']) > >- cls.sbTarget = cls.sbDebugger.CreateTarget(str(cls.lldbWebKitTesterExecutable)) >+ cls.sbTarget = cls.sbDebugger.CreateTarget(cls.lldbWebKitTesterExecutable) > assert cls.sbTarget > cls.sbTarget.BreakpointCreateByName(BREAK_FOR_TESTING_FUNCTION_NAME, cls.sbTarget.GetExecutable().GetFilename()) > >@@ -87,6 +83,10 @@ class LLDBDebugSession(object): > > > class TestSummaryProviders(unittest.TestCase): >+ @classmethod >+ def shouldSkip(cls): >+ return not SystemHost().platform.is_mac() >+ > @classmethod > def setUpClass(cls): > global cached_debug_session >@@ -105,65 +105,65 @@ class TestSummaryProviders(unittest.TestCase): > > # MARK: WTFStringImpl_SummaryProvider test cases > >- def serial_test_WTFStringImpl_SummaryProvider_null_string(self): >+ def test_WTFStringImpl_SummaryProvider_null_string(self): > summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('aNullStringImpl'), {}) > self.assertEqual(summary, "{ length = 0, is8bit = 1, contents = '' }") > >- def serial_test_WTFStringImpl_SummaryProvider_empty_string(self): >+ def test_WTFStringImpl_SummaryProvider_empty_string(self): > summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('anEmptyStringImpl'), {}) > self.assertEqual(summary, "{ length = 0, is8bit = 1, contents = '' }") > >- def serial_test_WTFStringImpl_SummaryProvider_8bit_string(self): >+ def test_WTFStringImpl_SummaryProvider_8bit_string(self): > summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('an8BitStringImpl'), {}) > self.assertEqual(summary, "{ length = 8, is8bit = 1, contents = 'r\\xe9sum\\xe9' }") > >- def serial_test_WTFStringImpl_SummaryProvider_16bit_string(self): >+ def test_WTFStringImpl_SummaryProvider_16bit_string(self): > summary = lldb_webkit.WTFStringImpl_SummaryProvider(self._sbFrame.FindVariable('a16BitStringImpl'), {}) > self.assertEqual(summary, u"{ length = 13, is8bit = 0, contents = '\\u1680Cappuccino\\u1680\\x00' }") > > # MARK: WTFString_SummaryProvider test cases > >- def serial_test_WTFString_SummaryProvider_null_string(self): >+ def test_WTFString_SummaryProvider_null_string(self): > summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('aNullString'), {}) > self.assertEqual(summary, "{ length = 0, contents = '' }") > >- def serial_test_WTFString_SummaryProvider_empty_string(self): >+ def test_WTFString_SummaryProvider_empty_string(self): > summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('anEmptyString'), {}) > self.assertEqual(summary, "{ length = 0, contents = '' }") > >- def serial_test_WTFString_SummaryProvider_8bit_string(self): >+ def test_WTFString_SummaryProvider_8bit_string(self): > summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('an8BitString'), {}) > self.assertEqual(summary, "{ length = 8, contents = 'r\\xe9sum\\xe9' }") > >- def serial_test_WTFString_SummaryProvider_16bit_string(self): >+ def test_WTFString_SummaryProvider_16bit_string(self): > summary = lldb_webkit.WTFString_SummaryProvider(self._sbFrame.FindVariable('a16BitString'), {}) > self.assertEqual(summary, u"{ length = 13, contents = '\\u1680Cappuccino\\u1680\\x00' }") > > # MARK: WTFVector_SummaryProvider test cases > >- def serial_test_WTFVectorProvider_empty_vector(self): >+ def test_WTFVectorProvider_empty_vector(self): > variable = self._sbFrame.FindVariable('anEmptyVector'); > summary = lldb_webkit.WTFVector_SummaryProvider(variable, {}) > self.assertEqual(summary, "{ size = 0, capacity = 0 }") > >- def serial_test_WTFVectorProvider_vector_size_and_capacity(self): >+ def test_WTFVectorProvider_vector_size_and_capacity(self): > variable = self._sbFrame.FindVariable('aVectorWithOneItem'); > summary = lldb_webkit.WTFVector_SummaryProvider(variable, {}) > self.assertEqual(summary, "{ size = 1, capacity = 16 }") > > # MARK: WTFHashMap_SummaryProvider and WTFHashSet_SummaryProvider test cases > >- def serial_test_WTFHashMap_tablesize_and_size(self): >+ def test_WTFHashMap_tablesize_and_size(self): > variable = self._sbFrame.FindVariable('hashMapOfInts') > summary = lldb_webkit.WTFHashMap_SummaryProvider(variable, {}) > self.assertEqual(summary, "{ tableSize = 8, keyCount = 2 }") > >- def serial_test_WTFHashMap_of_vectors_tablesize_and_size(self): >+ def test_WTFHashMap_of_vectors_tablesize_and_size(self): > variable = self._sbFrame.FindVariable('hashMapOfVectors') > summary = lldb_webkit.WTFHashMap_SummaryProvider(variable, {}) > self.assertEqual(summary, "{ tableSize = 8, keyCount = 1 }") > >- def serial_test_WTFHashSet_tablesize_and_size(self): >+ def test_WTFHashSet_tablesize_and_size(self): > variable = self._sbFrame.FindVariable('hashSetOfInts') > summary = lldb_webkit.WTFHashSet_SummaryProvider(variable, {}) > self.assertEqual(summary, "{ tableSize = 8, keyCount = 1 }")
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187916
:
348663
|
355684
|
385151
|
385159
|
385216
|
385257
|
385272
|
385289
|
385311