OLD | NEW |
---|---|
1 # Using a chroot | 1 # Using a chroot |
2 | 2 |
3 If you want to run layout tests and you're not running Lucid, you'll get errors due to version differences in libfreetype. To work around this, you can use a ch root. | 3 If you want to run layout tests and you're not running Lucid, you'll get errors |
4 due to version differences in libfreetype. To work around this, you can use a | |
5 chroot. | |
4 | 6 |
5 # Basic Instructions | 7 ## Basic Instructions |
6 | 8 |
7 * Run `build/install-chroot.sh`. On the prompts, choose to install a 64-bit L ucid chroot and activate all your secondary mount points. | 9 * Run `build/install-chroot.sh`. On the prompts, choose to install a 64-bit |
8 * sudo edit `/etc/schroot/mount-lucid64bit` and uncomment `/run` and `/run/shm `. Verify that your mount points are correct and uncommented: for example, if y ou have a second hard drive at `/src`, you should have an entry like `/src /src none rw,bind 0 0`. | 10 Lucid chroot and activate all your secondary mount points. |
9 * Enter your chroot as root with `sudo schroot -c lucid64`. Run `build/instal l-build-deps.sh`, then exit the rooted chroot. | 11 * sudo edit `/etc/schroot/mount-lucid64bit` and uncomment `/run` and |
10 * Delete your out/ directory if you had a previous non-chrooted build. | 12 `/run/shm`. Verify that your mount points are correct and uncommented: for |
11 * To enter your chroot as normal user, run `schroot -c lucid64`. | 13 example, if you have a second hard drive at `/src`, you should have an entry |
12 * Now run `build/gyp_chromium`, compile and run DumpRenderTree within chroot. | 14 like `/src /src none rw,bind 0 0`. |
15 * Enter your chroot as root with `sudo schroot -c lucid64`. | |
16 Run `build /install-build-deps.sh`, then exit the rooted chroot. | |
17 * Delete your out/ directory if you had a previous non-chrooted build. | |
18 * To enter your chroot as normal user, run `schroot -c lucid64`. | |
19 * Now run `build/gyp_chromium`, compile and run DumpRenderTree within chroot. | |
13 | 20 |
14 | 21 ## Tips and Tricks |
15 # Tips and Tricks | |
16 | 22 |
17 ## NFS home directories | 23 ## NFS home directories |
Bons
2015/08/25 16:51:01
this and Goma builds should be ###
nodir
2015/08/25 17:05:04
Done.
| |
18 The chroot install will be installed by default in /home/$USER/chroot. If your home directory is inaccessible by root (typically because it is mounted on NFS), then move this directory onto your local disk and change the corresponding entr y in `/etc/schroot/mount-lucid64bit`. | 24 |
25 The chroot install will be installed by default in /home/$USER/chroot. If your | |
26 home directory is inaccessible by root (typically because it is mounted on NFS), | |
27 then move this directory onto your local disk and change the corresponding entry | |
28 in `/etc/schroot/mount-lucid64bit`. | |
19 | 29 |
20 ## Goma builds | 30 ## Goma builds |
21 If you get mysterious compile errors (glibconfig.h or dbus header error), make s ure that goma is running in the chroot, or don't use goma for builds inside the chroot. | |
22 | 31 |
23 ## Different color prompt | 32 If you get mysterious compile errors (glibconfig.h or dbus header error), make |
33 sure that goma is running in the chroot, or don't use goma for builds inside the | |
34 chroot. | |
24 | 35 |
25 I use the following code in my .zshrc file to change the color of my prompt in t he chroot. | 36 ### Different color prompt |
26 ``` | 37 |
38 I use the following code in my .zshrc file to change the color of my prompt in | |
39 the chroot. | |
40 | |
41 ```shell | |
27 # load colors | 42 # load colors |
28 autoload colors zsh/terminfo | 43 autoload colors zsh/terminfo |
29 if [[ "$terminfo[colors]" -ge 8 ]]; then | 44 if [[ "$terminfo[colors]" -ge 8 ]]; then |
30 colors | 45 colors |
31 fi | 46 fi |
32 for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do | 47 for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do |
33 eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' | 48 eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' |
34 eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' | 49 eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' |
35 done | 50 done |
36 PR_NO_COLOR="%{$terminfo[sgr0]%}" | 51 PR_NO_COLOR="%{$terminfo[sgr0]%}" |
37 | 52 |
38 # set variable identifying the chroot you work in (used in the prompt below) | 53 # set variable identifying the chroot you work in (used in the prompt below) |
39 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then | 54 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then |
40 debian_chroot=$(cat /etc/debian_chroot) | 55 debian_chroot=$(cat /etc/debian_chroot) |
41 fi | 56 fi |
42 | 57 |
43 if [ "xlucid64" = "x$debian_chroot" ]; then | 58 if [ "xlucid64" = "x$debian_chroot" ]; then |
44 PS1="%n@$PR_GREEN% lucid64$PR_NO_COLOR %~ %#" | 59 PS1="%n@$PR_GREEN% lucid64$PR_NO_COLOR %~ %#" |
45 else | 60 else |
46 PS1="%n@$PR_RED%m$PR_NO_COLOR %~ %#" | 61 PS1="%n@$PR_RED%m$PR_NO_COLOR %~ %#" |
47 fi | 62 fi |
48 ``` | 63 ``` |
49 | 64 |
50 ## Running X apps | 65 ### Running X apps |
51 | 66 |
52 I also have `DISPLAY=:0` in my `$debian_chroot` section so I can run test\_shell or layout tests without manually setting my display every time. Your display n umber may vary (`echo $DISPLAY` outside the chroot to see what your display numb er is). | 67 I also have `DISPLAY=:0` in my `$debian_chroot` section so I can run test_shell |
68 or layout tests without manually setting my display every time. Your display | |
69 number may vary (`echo $DISPLAY` outside the chroot to see what your display | |
70 number is). | |
53 | 71 |
54 You can also use `Xvfb` if you only want to [run tests headless](http://code.goo gle.com/p/chromium/wiki/LayoutTestsLinux#Using_an_embedded_X_server). | 72 You can also use `Xvfb` if you only want to |
73 [run tests headless](layout_tests_linux.md#Using-an-embedded-X-server). | |
55 | 74 |
56 ## Having layout test results open in a browser | 75 ### Having layout test results open in a browser |
57 | 76 |
58 After running layout tests, you should get a new browser tab or window that open s results.html. If you get an error "Failed to open [file:///path/to/results.ht ml](file:///path/to/results.html)", check the following conditions. | 77 After running layout tests, you should get a new browser tab or window that |
78 opens results.html. If you get an error "Failed to open | |
79 file:///path/to/results.html, check the | |
80 following conditions. | |
59 | 81 |
60 1. Make sure `DISPLAY` is set. See the [Running X apps](https://code.google.co m/p/chromium/wiki/UsingALinuxChroot#Running_X_apps) section above. | 82 1. Make sure `DISPLAY` is set. See the |
61 1. Install `xdg-utils`, which includes `xdg-open`, a utility for finding the r ight application to open a file or URL with. | 83 [Running X apps](#Running_X_apps) section above. |
62 1. Install [Chrome](https://www.google.com/intl/en/chrome/browser/). | 84 1. Install `xdg-utils`, which includes `xdg-open`, a utility for finding the |
85 right application to open a file or URL with. | |
86 1. Install [Chrome](https://www.google.com/intl/en/chrome/browser/). | |
OLD | NEW |