autopkgtest
Run DEP-8 tests for Debian packages
TLDR
Build the package and run all tests directly on the system
$ autopkgtest -- null
Run a specific test for the package$ autopkgtest --test-name=[test_name] -- null
Download a specific package and run all tests$ autopkgtest [package] -- null
Test using a new root directory (chroot)$ autopkgtest -- chroot [path/to/new_root]
Test the package without rebuilding it$ autopkgtest -B -- null
SYNOPSIS
autopkgtest [options] source -- virtualization
DESCRIPTION
autopkgtest runs tests defined in Debian source packages according to the DEP-8 (autopkgtest) specification. It supports various virtualization backends for isolated testing environments.The tool separates the test specification from the execution environment using a -- separator. The virtualization backend (null, chroot, schroot, lxc, qemu, etc.) determines how tests are isolated.
PARAMETERS
--test-name=name
Run only the named test.--skip-test=name
Skip the named test.-B, --no-built-binaries
Do not build the package before testing; use the provided binaries.--setup-commands=commands
Run the given shell commands in the testbed before the tests.-U, --apt-upgrade
Run apt-get update and dist-upgrade in the testbed before testing.-s, --shell-fail
Open a shell in the testbed if a test fails, for debugging.--shell
Open a shell in the testbed after every test.-o directory, --output-dir=directory
Write test artifacts and logs to the specified directory.
VIRTUALIZATION BACKENDS
null
Run tests directly on the current system (no isolation)chroot path
Use a chroot environmentschroot name
Use a schroot environmentlxc container
Use an LXC containerqemu image
Use a QEMU virtual machine
CAVEATS
The null backend modifies the system directly and may leave changes behind. Chroot and other backends provide better isolation. Test definitions must follow the DEP-8 specification in debian/tests/control.
SEE ALSO
dpkg-buildpackage(1), lxc(1), schroot(1)
