Announce: autopkgtest integration for snappy images

Martin Pitt martin.pitt at
Tue Jan 6 14:37:13 UTC 2015

Hello all,

In autopkgtest 3.9, which is now in Ubuntu Vivid and Debian sid, I
added support for conveniently running tests on a snappy image in
QEMU. In particular, this is a setup script for the adt-virt-ssh
runner. Of course you can't use this to test .deb packages as they
can't get installed on snappy, but you can use it to run the initial
snappy self-tests in

  bzr branch lp:~snappy-dev/+junk/snappy-selftest

If you don't specify any options to it, it will create a temporary
snappy image from the default channel and run tests in it:

  adt-run snappy-selftest/ --- ssh -s snappy

It uses ubuntu-device-flash in this case, so after the first time the
downloaded image will be in the cache, and construction of the QEMU
image is a matter of some 10 seconds.

You can also specify --channel to the setup script (that needs a -- so
that it actually becomes an argument to "snappy" instead of to "ssh"):

  adt-run snappy-selftest/ --- ssh -s snappy -- --channel=ubuntu-core/devel-proposed

If you already have a local image, possibly modified to try out
something new:

  adt-run snappy-selftest/ --- ssh -s snappy -- -i /path/to/snappy.img

In the future, testing a .snap package will look similarly; but we
didn't specify the test metadata for .snap yet (we only have it for
debs and clicks).

Note that snappy-selftest is actually an image test, but it has DEP-8
metadata to "look like" a package test. This is of course a bit of an
abuse, but it works fine as long as you specify an empty "Depends:",
and it will help us to re-use the exact same infrastructure that we
already have and use for package tests.


Martin Pitt                        |
Ubuntu Developer (  | Debian Developer  (
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <>

More information about the snappy-devel mailing list