Historically, the “adt-run” command line has allowed multiple tests; as a consequence, arguments like
--override-control were position dependent, which confused users a lot (#795274, #785068, #795274, LP #1453509). On the other hand I don’t know anyone or any CI system which actually makes use of the “multiple tests on a single command line” feature.
The command line also was a bit confusing in other ways, like the explicit
--unbuilt-tree and the magic
// suffixes, or option vs. positional arguments to specify tests.
The other long-standing confusion is the pervasive “adt” acronym, which is still from the very early times when “autopkgtest” was called “autodebtest” (this was changed one month after autodebtest’s inception, in 2006!).
Thus in some recent night/weekend hack sessions I’ve worked on a new command line interface and consistent naming. This is now available in autopkgtest 4.0 in Debian unstable and Ubuntu Yakkety. You can download and use the deb package on Debian jessie and Ubuntu ≥ 14.04 LTS as well. (I will provide official backports after the first bug fix release after this got some field testing.)
New “autopkgtest” command
adt-run program is now superseded by
- It accepts only exactly one tested source package, and gives a proper error if none or more than one (often unintend) is given. Binaries to be tested,
--override-control, etc. can now be specified in any order, making the arguments position independent. So you now can do things like:
autopkgtest *.dsc *.deb [...]
*.debonly applied to the following test.
- The explicit
--click-sourceetc. options are gone, the type of tested source/binary packages, including built vs. unbuilt tree, is detected automatically. Tests are now only specified with positional arguments, without the need (or possibility) to explicitly specify their type. The one exception is
--installed-click com.example.myappas possible names are the same as for apt source package names.
# Old: adt-run --unbuilt-tree pkgs/foo-2 [...] # or equivalently: adt-run pkgs/foo-2// [...] # New: autopkgtest pkgs/foo-2
# Old: adt-run --git-source http://example.com/foo.git [...] # New: autopkgtest http://example.com/foo.git [...]
- The virtualization server is now separated with a double instead of a tripe dash, as the former is standard Unix syntax.
- It defaults to the current directory if that is a Debian source package. This makes the command line particularly simple for the common case of wanting to run tests in the package you are just changing:
autopkgtest -- schroot sid
Assuming the current directory is an unbuilt Debian package, this will build the package, and run the tests in
./debian/testsagainst the built binaries.
- The virtualization server must be specified with its “short” name only, e. g. “ssh” instead of “adt-virt-ssh”. They also don’t get installed into
$PATHany more, as it’s hardly useful to call them directly.
adt-run CLI is still available with unchanged behaviour, so it is safe to upgrade existing CI systems to that version.
Image build tools
adt-build* tools got renamed to
autopkgtest-build*, and got changed to build images prefixed with “autopkgtest” instead of “adt”. For example,
adt-build-lxc ubuntu xenial now produces an
autopkgtest-xenial container instead of
In order to not break existing CI systems, the new autopkgtest package contains symlinks to the old
adt-build* commands, and when being called through them, also produce images with the old “adt-” prefix.
Environment variables in tests
Finally there is a set of environment variables that are exported by autopkgtest for using in tests and image customization tools, which now got renamed from
As these are being used in existing tests and tools, autopkgtest also exports/checks those under their old ADT_* name. So tests can be converted gradually over time (this might take several years).