commit | c049dd0a43536e2642c496575bd8b3dfb85fb7cc | [log] [tgz] |
---|---|---|
author | dbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Jun 28 04:19:32 2018 +0000 |
committer | dbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Thu Jun 28 04:19:32 2018 +0000 |
tree | a434da80d51d7199793562ae624515ba006853e7 | |
parent | 8319bf36357bb566090be68984e35b5ea140cc62 [diff] |
Add some tests for lldb_webkit.py https://bugs.webkit.org/show_bug.cgi?id=183744 Reviewed by Alexey Proskuryakov. Adds some tests to ensure we do not regress LLDB pretty-printing of WTF::StringImpl and WTF::String objects. The tests make use of the LLDB Python API (lldb.py) and a simple debug-built test program, lldbWebKitTester, to run. For now, we only support building lldbWebKitTester on Mac. * Makefile: Build the simple test tool lldbWebKitTester on Mac. * Scripts/build-lldbwebkittester: Added. (buildProjectOrDie): * Scripts/dump-class-layout: Extract logic to compute the path to the LLDB Python module from here to Scripts/webkitpy/common/system/systemhost.py so that it can used by both this script and lldb/lldb_webkit_unittest.py. Also import the lldb module at the top of the file and take advantage of Python's default error semantics to throw an exception if the import fails instead of handling it ourself. This has the side effect that we now always import the LLDB Python module even if this script is invoked with --help. If this turns out to be a significant annoyance then we can look to dynamically import the module as we did before this change. (webkit_build_dir): (main): (developer_dir): Deleted. (import_lldb): Deleted. * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Update FIXME comment to reflect that fact that test-webkitpy does not support class and module fixtures. This is because test-webkitpy currently implements parallelism by breaking down existing test classes into individual test methods itself and having each worker run exactly one test method (via unittest.TestLoader.loadTestsFromName()) at a time. As a result of this reorganization, setUpModule()/setUpClass() are called for each test method as opposed to once per test class/test module. (remove_dir): Ditto. * Scripts/webkitpy/common/system/systemhost.py: (SystemHost): (SystemHost.path_to_lldb_python_directory): Added. * Scripts/webkitpy/test/main.py: (_find_lldb_webkit_tester): Returns whether there exists a Debug or Release-built lldbWebKitTester. (_build_lldb_webkit_tester): Builds lldbWebKitTester. For now, we only support building lldbWebKitTester on Mac. (main): Add Tools/lldb to the test search path if the platform has lldb.py. (Tester.run): Pass a boolean as to whether we will run the lldb_webkit unit tests. (Tester._run_tests): Modified to take a boolean as to whether to run the lldb_webkit unit tests. If we will run these tests then build lldbWebKitTester if it has not already been built as the unit tests depend on this program. * lldb/lldbWebKitTester/Configurations/Base.xcconfig: Added. * lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Added. * lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig: Added. * lldb/lldbWebKitTester/Makefile: Added. * lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Added. * lldb/lldbWebKitTester/main.cpp: Added. (breakForTestingSummaryProviders): (utf16String): (testSummaryProviders): (main): * lldb/lldb_webkit_unittest.py: Added. (destroy_cached_debug_session): (LLDBDebugSession): (LLDBDebugSession.setup): (LLDBDebugSession.tearDown): (TestSummaryProviders): (TestSummaryProviders.setUpClass): (TestSummaryProviders._sbFrame): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_empty_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string): (TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_null_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_empty_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string): (TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@233299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
Visit WebKit Feature Status page to see which Web API has been implemented, in development, or under consideration.
On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.
Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.
On Windows, follow the instructions on our website.
Run the following command to clone WebKit's Git SVN repository:
git clone git://git.webkit.org/WebKit.git WebKit
If you want to be able to commit changes to the repository, or just want to check out branches that aren’t contained in WebKit.git, you will need track WebKit's Subversion repository. You can run the following command to configure this and other options of the new Git clone for WebKit development.
Tools/Scripts/webkit-patch setup-git-clone
For information about this, and other aspects of using Git with WebKit, read the wiki page.
If you don‘t want to use Git, run the following command to check out WebKit’s Subversion repository:
svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
Install Xcode and its command line tools if you haven't done so already:
xcode-select --install
Run the following command to build a debug build with debugging symbols and assertions:
Tools/Scripts/build-webkit --debug
For performance testing, and other purposes, use --release
instead.
You can open WebKit.xcworkspace
to build and debug WebKit within WebKit.
If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild
directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select “Custom”, “Relative to Workspace”, and enter WebKitBuild
for both Products and Intermediates.
The first time after you install a new Xcode, you will need to run the following command to enable Xcode to build command line tools for iOS Simulator:
sudo Tools/Scripts/configure-xcode-for-ios-development
Without this step, you will see the error message: “target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.
” when building target JSCLLIntOffsetsExtractor
of project JavaScriptCore
.
Run the following command to build a debug build with debugging symbols and assertions for iOS:
Tools/Scripts/build-webkit --debug --ios-simulator.
For production builds:
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/gtk/install-dependencies Tools/Scripts/update-webkitgtk-libs Tools/Scripts/build-webkit --gtk --debug
For more information on building WebKitGTK+, see the wiki page.
For production builds:
cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/wpe/install-dependencies Tools/Scripts/update-webkitwpe-libs Tools/Scripts/build-webkit --wpe --debug
For building WebKit on Windows, see the wiki page.
Run the following command to launch Safari with your local build of WebKit:
Tools/Scripts/run-safari --debug
The run-safari
script sets the DYLD_FRAMEWORK_PATH
environment variable to point to your build products, and then launches /Applications/Safari.app
. DYLD_FRAMEWORK_PATH
tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks
.
To run other applications with your local build of WebKit, run the following command:
Tools/Scripts/run-webkit-app <application-path>
Run the following command to launch iOS simulator with your local build of WebKit:
run-safari --debug --ios-simulator
In both cases, if you have built release builds instead, use --release
instead of --debug
.
If you have a development build, you can use the run-minibrowser script, e.g.:
run-minibrowser --debug --wpe
Pass one of --gtk
, --jsc-only
, or --wpe
to indicate the port to use.
Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.