Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: docs/layout_tests_linux.md

Issue 1324603002: [Docs] Another round of stylistic fixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « docs/kiosk_mode.md ('k') | docs/linux64_bit_issues.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Running layout tests on Linux 1 # Running layout tests on Linux
2 2
3 1. Build `blink_tests` (see LinuxBuildInstructions) 3 1. Build `blink_tests` (see LinuxBuildInstructions)
4 1. Checkout the layout tests 4 1. Checkout the layout tests
5 * If you have an entry in your .gclient file that includes "LayoutTests", yo u may need to comment it out and sync. 5 * If you have an entry in your `.gclient` file that includes
6 * You can run a subset of the tests by passing in a path relative to `src/th ird_party/WebKit/LayoutTests/`. For example, `run_layout_tests.py fast` will on ly run the tests under `src/third_party/WebKit/LayoutTests/fast/`. 6 "LayoutTests", you may need to comment it out and sync.
7 1. When the tests finish, any unexpected results should be displayed. 7 * You can run a subset of the tests by passing in a path relative to
8 `src/third_party/WebKit/LayoutTests/`. For example,
9 `run_layout_tests.py fast` will only run the tests under
10 `src/third_party/WebKit/LayoutTests/fast/`.
11 1. When the tests finish, any unexpected results should be displayed.
8 12
9 See [Running WebKit Layout Tests](http://dev.chromium.org/developers/testing/web kit-layout-tests) for full documentation about set up and available options. 13 See
14 [Running WebKit Layout Tests](http://dev.chromium.org/developers/testing/webkit- layout-tests)
15 for full documentation about set up and available options.
10 16
11 ## Pixel Tests 17 ## Pixel Tests
12 18
13 The pixel test results were generated on Ubuntu 10.4 (Lucid). If you're running a newer version of Ubuntu, you will get some pixel test failures due to changes in freetype or fonts. In this case, you can create a Lucid 64 chroot using `bu ild/install-chroot.sh` to compile and run tests. 19 The pixel test results were generated on Ubuntu 10.4 (Lucid). If you're running
20 a newer version of Ubuntu, you will get some pixel test failures due to changes
21 in freetype or fonts. In this case, you can create a Lucid 64 chroot using
22 `build/install-chroot.sh` to compile and run tests.
14 23
15 ## Fonts 24 ## Fonts
16 25
17 Make sure you have all the necessary fonts installed. 26 Make sure you have all the necessary fonts installed.
18 ``` 27
28 ```shell
19 sudo apt-get install apache2 wdiff php5-cgi ttf-indic-fonts \ 29 sudo apt-get install apache2 wdiff php5-cgi ttf-indic-fonts \
20 msttcorefonts ttf-dejavu-core ttf-kochi-gothic ttf-kochi-mincho \ 30 msttcorefonts ttf-dejavu-core ttf-kochi-gothic ttf-kochi-mincho \
21 ttf-thai-tlwg 31 ttf-thai-tlwg
22 ``` 32 ```
23 33
24 You can also just run `build/install-build-deps.sh` again. 34 You can also just run `build/install-build-deps.sh` again.
25 35
26 ## Plugins 36 ## Plugins
27 37
28 If `fast/dom/object-plugin-hides-properties.html` and `plugins/embed-attributes- style.html` are failing, try uninstalling `totem-mozilla` from your system: 38 If `fast/dom/object-plugin-hides-properties.html` and
29 ``` 39 `plugins/embed-attributes-style.html` are failing, try uninstalling
30 sudo apt-get remove totem-mozilla 40 `totem-mozilla` from your system:
31 ``` 41
42 sudo apt-get remove totem-mozilla
43
32 44
33 ## Running layout tests under valgrind on Linux 45 ## Running layout tests under valgrind on Linux
34 46
35 As above, but use `tools/valgrind/chrome_tests.sh -t webkit` instead. e.g. 47 As above, but use `tools/valgrind/chrome_tests.sh -t webkit` instead. e.g.
36 ``` 48
37 sh tools/valgrind/chrome_tests.sh -t webkit LayoutTests/fast/ 49 sh tools/valgrind/chrome_tests.sh -t webkit LayoutTests/fast/
38 ``` 50
39 This defaults to using --debug. Read the script for more details. 51 This defaults to using --debug. Read the script for more details.
40 52
41 If you're trying to reproduce a run from the valgrind buildbot, look for the --r un\_chunk=XX:YY 53 If you're trying to reproduce a run from the valgrind buildbot, look for the
42 line in the bot's log. You can rerun exactly as the bot did with the commands 54 `--run_chunk=XX:YY` line in the bot's log. You can rerun exactly as the bot did
43 ``` 55 with the commands.
56
57 ```shell
44 cd ~/chromium/src 58 cd ~/chromium/src
45 echo XX > valgrind_layout_chunk.txt 59 echo XX > valgrind_layout_chunk.txt
46 sh tools/valgrind/chrome_tests.sh -t layout -n YY 60 sh tools/valgrind/chrome_tests.sh -t layout -n YY
47 ``` 61 ```
62
48 That will run the XXth chunk of YY layout tests. 63 That will run the XXth chunk of YY layout tests.
49 64
50 ## Configuration tips 65 ## Configuration tips
51 * Use an optimized content\_shell when rebaselining or running a lot of tests. ([bug 8475](http://code.google.com/p/chromium/issues/detail?id=8475) is about how the debug output differs from the optimized output.) `ninja -C out/Release content_shell` 66
52 * Make sure you have wdiff installed: `sudo apt-get install wdiff` to get pret tier diff output 67 * Use an optimized `content_shell` when rebaselining or running a lot of
53 * Some pixel tests may fail due to processor-specific rounding errors. Build u sing a chroot jail with Lucid 64-bit user space to be sure that your system matc hes the checked in baselines. You can use `build/install-chroot.sh` to set up a Lucid 64 chroot. Learn more about [UsingALinuxChroot](UsingALinuxChroot.md). 68 tests. ([bug 8475](https://crbug.com/8475) is about how the debug output
69 differs from the optimized output.)
70
71 `ninja -C out/Release content_shell`
72
73 * Make sure you have wdiff installed: `sudo apt-get install wdiff` to get
74 prettier diff output.
75 * Some pixel tests may fail due to processor-specific rounding errors. Build
76 using a chroot jail with Lucid 64-bit user space to be sure that your system
77 matches the checked in baselines. You can use `build/install-chroot.sh` to
78 set up a Lucid 64 chroot. Learn more about
79 [using a linux chroot](using_a_linux_chroot.md).
80
54 ## Getting a layout test into a debugger 81 ## Getting a layout test into a debugger
55 82
56 There are two ways: 83 There are two ways:
57 1. Run content\_shell directly rather than using run\_layout\_tests.py. You wi ll need to pass some options: 84
58 * `--no-timeout` to give you plenty of time to debug 85 1. Run `content_shell` directly rather than using `run_layout_tests.py`. You
59 * the fully qualified path of the layout test (rather than relative to `WebK it/LayoutTests`). 86 will need to pass some options:
60 1. Or, run as normal but with the `--additional-drt-flag=--renderer-startup-di alog --additional-drt-flag=--no-timeout --time-out-ms=86400000` flags. The firs t one makes content\_shell bring up a dialog before running, which then would le t you attach to the process via `gdb -p PID_OF_DUMPRENDERTREE`. The others help avoid the test shell and DumpRenderTree timeouts during the debug session. 87 * `--no-timeout` to give you plenty of time to debug
88 * the fully qualified path of the layout test (rather than relative to
89 `WebKit/LayoutTests`).
90 1. Or, run as normal but with the
91 `--additional-drt-flag=--renderer-startup-dialog
92 --additional-drt-flag=--no-timeout --time-out-ms=86400000` flags. The first
93 one makes content\_shell bring up a dialog before running, which then would
94 let you attach to the process via `gdb -p PID_OF_DUMPRENDERTREE`. The others
95 help avoid the test shell and DumpRenderTree timeouts during the debug
96 session.
61 97
62 ## Using an embedded X server 98 ## Using an embedded X server
63 99
64 If you try to use your computer while the tests are running, you may get annoyed as windows are opened and closed automatically. To get around this, you can cr eate a separate X server for running the tests. 100 If you try to use your computer while the tests are running, you may get annoyed
101 as windows are opened and closed automatically. To get around this, you can
102 create a separate X server for running the tests.
65 103
66 1. Install Xephyr (`sudo apt-get install xserver-xephyr`) 104 1. Install Xephyr (`sudo apt-get install xserver-xephyr`)
67 1. Start Xephyr as display 4: `Xephyr :4 -screen 1024x768x24` 105 1. Start Xephyr as display 4: `Xephyr :4 -screen 1024x768x24`
68 1. Run the layout tests in the Xephyr: `DISPLAY=:4 run_layout_tests.py` 106 1. Run the layout tests in the Xephyr: `DISPLAY=:4 run_layout_tests.py`
69 107
70 Xephyr supports debugging repainting. See the [Xephyr README](http://cgit.freed esktop.org/xorg/xserver/tree/hw/kdrive/ephyr/README) for details. In brief: 108 Xephyr supports debugging repainting. See the
71 1. `XEPHYR_PAUSE=$((500*1000)) Xephyr ...etc... # 500 ms repaint flash` 109 [Xephyr README](http://cgit.freedesktop.org/xorg/xserver/tree/hw/kdrive/ephyr/RE ADME)
72 1. `kill -USR1 $(pidof Xephyr)` 110 for details. In brief:
73 111
74 If you don't want to see anything at all, you can use Xvfb (should already be in stalled). 112 1. `XEPHYR_PAUSE=$((500*1000)) Xephyr ...etc... # 500 ms repaint flash`
75 1. Start Xvfb as display 4: `Xvfb :4 -screen 0 1024x768x24` 113 1. `kill -USR1 $(pidof Xephyr)`
76 1. Run the layout tests in the Xvfb: `DISPLAY=:4 run_layout_tests.py` 114
115 If you don't want to see anything at all, you can use Xvfb (should already be
116 installed).
117
118 1. Start Xvfb as display 4: `Xvfb :4 -screen 0 1024x768x24`
119 1. Run the layout tests in the Xvfb: `DISPLAY=:4 run_layout_tests.py`
77 120
78 ## Tiling Window managers 121 ## Tiling Window managers
79 122
80 The layout tests want to run with the window at a particular size down to the pi xel level. This means if your window manager resizes the window it'll cause tes t failures. This is another good reason to use an embedded X server. 123 The layout tests want to run with the window at a particular size down to the
124 pixel level. This means if your window manager resizes the window it'll cause
125 test failures. This is another good reason to use an embedded X server.
81 126
82 ### xmonad 127 ### xmonad
83 In your `.xmonad/xmonad.hs`, change your config to include a manageHook along th ese lines: 128
129 In your `.xmonad/xmonad.hs`, change your config to include a manageHook along
130 these lines:
131
84 ``` 132 ```
85 test_shell_manage = className =? "Test_shell" --> doFloat 133 test_shell_manage = className =? "Test_shell" --> doFloat
86 main = xmonad $ 134 main = xmonad $
87 defaultConfig 135 defaultConfig
88 { manageHook = test_shell_manage <+> manageHook defaultConfig 136 { manageHook = test_shell_manage <+> manageHook defaultConfig
89 ... 137 ...
90 ``` 138 ```
OLDNEW
« no previous file with comments | « docs/kiosk_mode.md ('k') | docs/linux64_bit_issues.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698