If you want to run web 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 chroot.
build/install-chroot.sh
. On the prompts, choose to install a 64-bit Lucid chroot and activate all your secondary mount points./etc/schroot/mount-lucid64bit
and uncomment/run
and/run/shm
. Verify that your mount points are correct and uncommented: for example, if you have a second hard drive at/src
, you should have an entry like/src /src none rw,bind 0 0
.sudo schroot -c lucid64
. Runbuild /install-build-deps.sh
, then exit the rooted chroot.schroot -c lucid64
.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 entry in/etc/schroot/mount-lucid64bit
.
If you get mysterious compile errors (glibconfig.h or dbus header error), don't use reclient for builds inside the chroot.
I use the following code in my .zshrc file to change the color of my prompt in the chroot.
# load colorsautoload colors zsh/terminfoif[["$terminfo[colors]"-ge8]];then colorsfifor colorin RED GREEN YELLOW BLUE MAGENTA CYAN WHITE;doeval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'donePR_NO_COLOR="%{$terminfo[sgr0]%}"# set variable identifying the chroot you work in (used in the prompt below)if[-z"$debian_chroot"]&&[-r/etc/debian_chroot];then debian_chroot=$(cat/etc/debian_chroot)fiif["xlucid64"="x$debian_chroot"];then PS1="%n@$PR_GREEN% lucid64$PR_NO_COLOR %~ %#"else PS1="%n@$PR_RED%m$PR_NO_COLOR %~ %#"fi
I also haveDISPLAY=:0
in my$debian_chroot
section so I can run test_shell or web tests without manually setting my display every time. Your display number may vary (echo $DISPLAY
outside the chroot to see what your display number is).
You can also useXvfb
if you only want torun tests headless.
After running web tests, you should get a new browser tab or window that opens results.html. If you get an error "Failed to openfile:///path/to/results.html, check the following conditions.
DISPLAY
is set. See theRunning X apps section above.xdg-utils
, which includesxdg-open
, a utility for finding the right application to open a file or URL with.