Version 20 (modified by, 11 years ago) (diff)


Running Tests for WebKitGTK+


ATENTION: we are currently with work underway to automate dependency instalation, so that we can more easily guarantee a standardized test environment, so that tests always pass regardless of the versions of fonts and libraries you have on your system, please bear with us

What do you need to do right now: make sure jhbuild is installed on your $PATH, then run ./Tools/Scripts/update-webkitgtk-libs, after that you can safely use build-webkit and run-webkit-tests

What we are currently working on: every call to jhbuild will be done to a wrapper script that will clone and install jhbuild to a directory inside WebKit's build directory automatically if it isn't there, and then install the dependencies using it

You will need to install the following Debian packages to 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 \
                     ttf-liberation \
                     otf-stix \
                     libgstreamer-plugins-base0.10-0 \
                     gstreamer0.10-plugins-base \
                     gstreamer0.10-plugins-good  \
                     gstreamer0.10-plugins-bad \
                     gstreamer0.10-ffmpeg \

GStreamer -core and -plugins-base >= 0.10.30 is required.

Currently the tests require specific versions of some packages (this is for Debian):

apt-get install xfonts-100dpi=1:1.0.1 xfonts-75dpi=1:1.0.1  xfonts-base=1:1.0.1 xfonts-encodings=1:1.0.3-1 xfonts-scalable=1:1.0.1-1
apt-get install ttf-dejavu-core=2.31-1 ttf-dejavu-extra=2.31-1 ttf-lyx=1.6.7-1
apt-get install libfreetype6=2.4.2-2.1 libfreetype6-dev=2.4.2-2.1

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