ParallelTests

Not logged in - Log In / Register

Overview

Parallel testing would be nice. Theres a bunch of things to do to make it work. See the LEP for constraints/goals/resourcing.

Known bugs/issues: parallel test bugs

LXC containers and parallel testing

LXC containers combined with overlayfs (was aufs) offer a pretty cheap way to get solid isolation - a great big hammer of a workaround for our existing globals (shared work dirs etc). William put together a proof of concept, Robert made that generic, and it is now available, significantly refactored by Serge Hallyn, in lxc for Oneiric and later as "lxc-start-ephemeral". That, combined with an updated .testr.conf given in the instructions below (a TODO is to offer profiles for testr) will let testr run tests in a temporary container. (e.g. testr -- -t stories/gpg will fire up an aufs container and run the stories/gpg tests inside it).

Be sure to export LP_LXC_BASE with the name of your lxc base container.

See Running/LXC for info on setting up a base container.

Caveats

Workflow

One-time

Working

Running tests

Tips

Accessing a LXC container from a buildbot slave

The default lxc container does not have any users you can use to login. To get around this you can set a password for root in the host and copy the corresponding line from the host's /etc/shadow to that of the container. You can then log into the container using the same password. The steps are:

root@host> passwd root  # set password to, say, 'foo'
root@host> grep root /etc/shadow >> /var/lib/lxc/lptests/rootfs/etc/shadow
root@host> vi /var/lib/lxc/lptests/rootfs/etc/shadow  # Remove the orginal 'root' line with blank password information

Now, when you lxc-start -n lptests you can login as root using the password foo.

ParallelTests (last edited 2012-05-24 11:24:29 by bac)