Yesterday’s autopkgtest 3.2 release brings several changes and improvements that developers should be aware of.
Cleanup of CLI options, and config files
adt-run versions had rather complex, confusing, and rarely (if ever?) used options for filtering binaries and building sources without testing them. All of those (
--built-binaries-filter<code>, <code>--binaries-forbuilds, and
--binaries-fortests) now went away. Now there is only
--no-built-binaries left, which disables building/using binaries for the subsequent unbuilt tree or dsc arguments (by default they get built and their binaries used for tests), and I added its opposite
--built-binaries for completeness (although you most probably never need this).
--help output now is a lot easier to read, both due to above cleanup, and also because it now shows several paragraphs for each group of related options, and sorts them in descending importance. The manpage got updated accordingly.
Another new feature is that you can now put arbitrary parts of the command line into a file (thanks to porting to Python’s argparse), with one option/argument per line. So you could e. g. create config files for options and runners which you use often:
$ cat adt_sid --output-dir=/tmp/out -s --- schroot sid $ adt-run libpng @adt_sid
Shell command tests
If your test only contains a shell command or two, or you want to re-use an existing upstream test executable and just need to wrap it with some command like
env, you can use the new
Test-Command: field instead of
Tests: to specify the shell command directly:
Test-Command: xvfb-run -a src/tests/run Depends: @, xvfb, [...]
This avoids having to write lots of tiny wrappers in
debian/tests/. This was already possible for click manifests, this release now also brings this for deb packages.
It is now very easy to define an autopilot test with extra package dependencies or restrictions, without having to specify the full command, using the new
autopilot_module test definition. See /usr/share/doc/autopkgtest/README.click-tests.html for details.
If your test fails and you just want to run your test with additional dependencies or changed restrictions, you can now avoid having to rebuild the .click by pointing
--override-control (which previously only worked for deb packages) to the locally modified manifest. You can also (ab)use this to e. g. add the autopilot
-v option to
Unpacking of test dependencies was made more efficient by not downloading Python 2 module packages (which cannot be handled in “unpack into temp dir” mode anyway).
Finally, I made the adb setup script more robust and also faster.
As usual, every change in control formats, CLI etc. have been documented in the manpages and the various READMEs. Enjoy!