Version 22 (modified by 13 years ago) ( diff ) | ,
---|
Running Tests for WebKitGTK+
Dependencies
You will need to install the following Debian packages to build WebKitGTK+ and run the layout tests. For other distributions, you must install the equivalent packages.
sudo apt-get install curl \ ruby \ apache2 \ libapache2-mod-php5 \ libapache2-mod-bw \ libgpg-error-dev \ libgstreamer-plugins-base0.10-0 \ gstreamer0.10-plugins-base \ gstreamer0.10-plugins-good \ gstreamer0.10-plugins-bad \ gstreamer0.10-ffmpeg \ xvfb pulseaudio-utils
GStreamer -core and -plugins-base >= 0.10.30 is required.
To make it easier to run the test and have coherent results we built jhbuild into our build process and test running script. The scripts will automatically fetch jhbuild from git, install it to a private location and use it to install some dependencies. Those are mostly dependencies on very recent versions of packages that can't be easily found in distributions or packages for which we require very specific versions. This very specific requirement is the only way to make sure that layouts and rendering are the same as in the buildbots, so you can get tests passing locally.
Running the Tests
Simply run the run-webkit-tests
script from the Tools directory. run-webkit-tests
also supports the --debug
argument to run the tests with the debug build of WebKitGTK+.
./Tools/Scripts/run-webkit-tests --gtk [--debug]
If you wish to run a single test you can do:
./Tools/Scripts/run-webkit-tests --gtk fast/forms/plaintext-mode-1.html
Pixel Tests
WebKitGTK+ supports running pixel tests, but they are not enabled by default. To run them simply pass the -p
argument to run-webkit-tests
:
./Tools/Scripts/run-webkit-tests --gtk -p
Adding Baselines
Sometimes you may need to generate new results for a test that relies on render tree output. This can be accomplished by passing the --new-test-results
option. Note that new pixel results require the -p
option as well:
./Tools/Scripts/run-webkit-tests --gtk fast/forms/plaintext-mode-1.html --new-test-results
Running Tests in GDB
For debugging a test it may be useful to run it directly in DumpRenderTree (with gdb):
WebKitBuild/Debug/Programs/DumpRenderTree -v LayoutTests/fast/forms/plaintext-mode-1.html