| | 1 | == Dependencies == |
| | 2 | |
| | 3 | You will need to install the following Debian packages to run the layout tests. For other distributions, you must install the equivalent packages. |
| | 4 | {{{ |
| | 5 | sudo aptitude install curl ruby apache2 libapache2-mod-php5 |
| | 6 | }}} |
| | 7 | |
| | 8 | == Xvfb == |
| | 9 | |
| | 10 | WebKit functional tests for WebKitGTK+ should be run inside a virtual framebuffer environment. The most common choice for WebKItGTK developers is Xvfb. To start Xvfb simply run: |
| | 11 | {{{ |
| | 12 | Xvfb :23 -ac -screen 0 1024x768x16 & |
| | 13 | }}} |
| | 14 | `-screen 0 1024x768x16` ensures that Xvfb has a deep enough color depth to produce accurate pixel test results. Some older versions of Ubuntu may have bugs which cause Xvfb to segfault while running tests. A workaround for this is to run Xvfb with the GLX extension disabled: |
| | 15 | {{{ |
| | 16 | Xvfb :23 -ac -screen 0 1024x768x16 -extension GLX & |
| | 17 | }}} |
| | 18 | |
| | 19 | == Fonts == |
| | 20 | |
| | 21 | The tests require you to use the testfonts package shared between the QtWebKit and WebKitGTK+ ports. To get this package via git run: |
| | 22 | {{{ |
| | 23 | git clone git://gitorious.org/qtwebkit/testfonts.git |
| | 24 | }}} |
| | 25 | |
| | 26 | The tests require the WEBKIT_TESTFONTS environment variable to point to the location of this repository on your local machine. |
| | 27 | |
| | 28 | == Running the Tests == |
| | 29 | |
| | 30 | Simply run the run-webkit-tests script from the WebKitTools directory: |
| | 31 | {{{ |
| | 32 | env -i DISPLAY=:23 WEBKIT_TESTFONTS=/home/developer/work/testfonts ./WebKitTools/Scripts/run-webkit-tests --gtk |
| | 33 | }}} |
| | 34 | If you wish to run a single test you can do: |
| | 35 | {{{ |
| | 36 | env -i DISPLAY=:23 WEBKIT_TESTFONTS=/home/developer/work/testfonts \ |
| | 37 | ./WebKitTools/Scripts/run-webkit-tests --gtk fast/forms/plaintext-mode-1.html |
| | 38 | }}} |
| | 39 | For debugging a test it may be useful to run it directly in DumpRenderTree (with gdb): |
| | 40 | {{{ |
| | 41 | WebKitBuild/Debug/Programs/DumpRenderTree -v LayoutTests/fast/forms/plaintext-mode-1.html |
| | 42 | }}} |