LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

autopkgtest

Run DEP-8 tests for Debian packages

TLDR

Build the package and run all tests directly on the system
$ autopkgtest -- null
copy
Run a specific test for the package
$ autopkgtest --test-name=[test_name] -- null
copy
Download a specific package and run all tests
$ autopkgtest [package] -- null
copy
Test using a new root directory (chroot)
$ autopkgtest -- chroot [path/to/new_root]
copy
Test the package without rebuilding it
$ autopkgtest -B -- null
copy

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 environment
schroot name
Use a schroot environment
lxc container
Use an LXC container
qemu 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

RESOURCES

Copied to clipboard
Kai