LinuxCommandLibrary

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 specified test
-B, --no-built-binaries
Do not build the package before testing
--shell-fail
Open a shell on test failure for debugging
-o directory
Write test output 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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community