autopkgtest + chroot howto ? - Was: Re: Is it possible to run autopkgtest without a virtual machine ?

Martin Pitt mpitt at debian.org
Sun Jan 26 17:09:51 UTC 2014


Hey Olivier,

Olivier Berger [2014-01-26 14:45 +0100]:
> I haven't been able to find a comprehensive set of instructions on how
> to get started with autopkgtest, and I imagined that chroot would be an
> interesting option.

TBH I never use it myself, it's largely obsolete. You shouldn't use it
with a "plain" directory chroot, as it cannot properly clean up after
itself. You can call it with a dchroot name, so that dchroot does the
overlays/cleanup, but as dchroot has been superseded by schroot that's
obsolete.

I advise to use the schroot runner instead. schroots are easy to set
up these days with mk-sbuild, and with some additional love (like
installing and configuring apt-cacher-ng and symlinking
/var/lib/schroot/union/overlay/ and /var/lib/schroot/unpack/ to /tmp/,
and having /tmp on a tmpfs),  set up, tear down, and package
installation are extremely fast. Then running autopkgtests with them
is a simple matter of e. g.

  adt-run <pkgname> --- adt-virt-schroot sid

if "sid" is your desired schroot name.

> I quite don't see the interest of the adt-virt-null, as I suppose that a
> clean test bed is generally required when testing... :-/

It is mainly useful for two cases:

 * You already have all the test dependencies installed on your
   developer machine and just want to quickly run tests of your
   package. It doesn't suffice for verifying that your test
   depends are sufficient and your test actually works in a
   minimal/untainted environment, but if you just want to test a
   change, its the fastest thing you can get.

 * You use adt-virt-null within an already built test bed such as
   Qemu. (That's how Ubuntu currently runs its production
   autopkgtests, as there is no adt-virt-qemu yet  [1])

FTR, adt-virt-lxc is also a very nice runner as it provides much
better isolation than schroots; but currently it requires an image
with cloud-init, and AFAIK there are no ready-made daily Debian cloud
images at the moment. Improving lxc itself and/or adt-virt-lxc to work
for arbitrary containers would be nice.

Martin

[1] http://bazaar.launchpad.net/~auto-package-testing-dev/auto-package-testing/trunk/

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)



More information about the autopkgtest-devel mailing list