autodep8(1)
π autodep8 β the DEP-8 test control file generator π
okay so welcome to autodep8(1), bestie. this is the lil glow-up generator that writes DEP-8 test control files for you so you don't have to, and honestly? it's giving β¨magicβ¨. let's get into it π«Ά
πΈ NAME πΈ
autodep8 β the DEP-8 test control file generator. that's the whole vibe, that's the whole job π
π¦ DESCRIPTION π¦
so here's the tea: autodep8 will detect well-known types of packages and then generate DEP-8-compliant test control files for them. iconic behaviour, no notes.
it can be used by DEP-8 implementations to support implicit test control files. that's it, that's the assignment π
π USAGE π
the two moods of running this thing:
$ autodep8 # assumes source package in current dir
$ autodep8 /path/to/srcpkg # path to source package
so if it detects a known package type, autodep8 exits with 0 and prints the suggested contents of debian/tests/control straight to standard output. chef's kiss π
and if a known package type is NOT detected? autodep8 exits with 1 and produces no output. silence. ghosted. π
π AUTOMATIC USAGE BY AUTOPKGTEST π
plot twist, you don't even have to call it yourself β autodep8 can be automatically called by autopkgtest(1). to make that happen, you gotta set the Testsuite: field in the source package paragraph to:
autopkgtest-pkg-TYPE
where TYPE is one of the package types supported by autodep8. the valid values of TYPE are listed below as the headings of the "EXAMPLES OF PRODUCED TEST CONTROL FILES" section β iykyk, scroll down π«
and hey, go read the autopkgtest(1) documentation for more details, it's all there π«Ά
π HOW THE PACKAGE TYPE IS DETECTED π
okay so the detective work goes like this:
autodep8 will first look for the Testsuite: autopkgtest-pkg-TYPE field in debian/control. if TYPE is a known package type, then boom, that's the one, that's what gets used. β
if it's not, then each supported package type is tried against a set of heuristics, based on:
- package names
- build dependencies
- specific files under
debian/ - or a combination of those π
π PACKAGE-SPECIFIC CONFIGURATION π
packages can serve up their own config for autodep8 in:
debian/tests/autopkgtest-pkg-${PACKAGETYPE}.conf
and the file format? here it is, verbatim, no cap:
# comment lines start with # and are ignored.
# note that #'s only mark comments when in the beginning of the line
# empty lines are also ignored
# values are set in this format:
var1=value1
# spaces around the = sign are allowed
var2 = value 2
# backslashes allow one to set values that span multiple lines.
# Note that the newline is removed in the final value, though
# The following is equivalent to "multilinevar=value1, value2"
multilinevar = value1, \
value2
and these are the configuration variables that are supported π
β¨ All package types β¨
extra_dependsβ extra test dependencies to be added to the generated tests. will be included as-is in the generated control file. πextra_restrictionsβ extra restrictions to be added to the generated tests. will be included as-is in the generated control file. πarchitectureβ adds restrictions on what architecture the generated tests are suitable to run on. will be included as-is in the generated control file. π
β¨ octave (debian/tests/autopkgtest-pkg-octave.conf) β¨
test_envβ value for theDH_OCTAVE_TEST_ENVenvironment variable that will be used when invokingdh_octave_check. the default value ofDH_OCTAVE_TEST_ENVis"xvfb -a". π
β¨ python (debian/tests/autopkgtest-pkg-python.conf) β¨
import_nameβ name of the module to import, if it can't be inferred from the name of the Debian package. for example,python3-xlibis used viaimport Xlib, soimport_name = Xlibwould be appropriate. this used to be configured by writing todebian/tests/pkg-python/import-name, but that is now deprecated. π
π§ COMBINING AUTO-GENERATED TESTS WITH MANUALLY SPECIFIED ONES π§
if debian/tests/control exists, autodep8 will prepend the contents of that file to its own output. and in that case, autodep8 will exit with a status of 0 even if no known package type is detected. bestie said "you get a zero, and you get a zero" π
the same applies for debian/tests/control.autodep8, but the use of that file is deprecated because the test dependencies defined there aren't processed by dpkg-source. so like... don't. π
π EXAMPLES OF PRODUCED TEST CONTROL FILES π
here come the receipts, bestie. look at all these beautiful generated files π
dkms (kpatch)
Test-Command: /usr/lib/dkms/dkms-autopkgtest
Restrictions: needs-root, allow-stderr
Depends: @, dkms
elpa (flycheck)
Test-Command: dh_elpa_test --autopkgtest
Depends: @, @builddeps@
Restrictions: rw-build-tree
go (prometheus)
Test-Command: /usr/bin/dh_golang_autopkgtest
Depends: @, @builddeps@, dh-golang
Restrictions: allow-stderr
Architecture: !armhf
nodejs (node-tar)
Test-Command: /usr/share/pkg-js-autopkgtest/runner require
Depends: @, pkg-js-autopkgtest
Restrictions: superficial
Test-Command: /usr/share/pkg-js-autopkgtest/runner
Depends: @, @builddeps@, pkg-js-autopkgtest
Restrictions: allow-stderr, skippable
octave (octave-signal)
Test-Command: DH_OCTAVE_TEST_ENV="xvfb-run -a" /usr/bin/dh_octave_check --use-installed-package
Depends: @, octave-control (>= 3.1.0), dh-octave-autopkgtest (>= 0.5.6), xauth, xvfb
Restrictions: allow-stderr
perl (libtest-most-perl)
Test-Command: /usr/share/pkg-perl-autopkgtest/runner build-deps
Depends: @, @builddeps@, pkg-perl-autopkgtest
Features: test-name=autodep8-perl-build-deps
Test-Command: /usr/share/pkg-perl-autopkgtest/runner runtime-deps
Depends: @, pkg-perl-autopkgtest
Features: test-name=autodep8-perl
Test-Command: /usr/share/pkg-perl-autopkgtest/runner runtime-deps-and-recommends
Depends: @, pkg-perl-autopkgtest
Restrictions: needs-recommends
Features: test-name=autodep8-perl-recommends
php (php-composer-semver)
Test-Command: phpunit-autopkgtest
Depends: @, phpunit, pkg-php-tools, @builddeps@,
Restrictions: allow-stderr, skippable,
Features: test-name=phpunit-autopkgtest
puppet_module (puppet-module-puppetlabs-mysql)
Test-Command: /usr/bin/dh_puppet_module_autopkgtest debian/tests/module_test.pp
Depends: @, dh-puppet, puppet-agent,
Restrictions: needs-root, isolation-container,
Features: test-name=dh-puppet-module-autopkgtest
pybuild (python-ofxclient)
Test-Command: pybuild-autopkgtest
Depends: @, pybuild-plugin-autopkgtest, @builddeps@,
Restrictions: allow-stderr, skippable,
Features: test-name=pybuild-autopkgtest
python (python-flaky)
Test-Command: set -e ; for py in $(py3versions -r 2>/dev/null) ; do cd "$AUTOPKGTEST_TMP" ; echo "Testing with $py:" ; $py -c "import flaky; print(flaky)" ; done
Depends: python3-all, python3-flaky
Restrictions: allow-stderr, superficial
Features: test-name=autodep8-python3
Test-Command: cd "$AUTOPKGTEST_TMP" ; pypy -c "import flaky; print flaky"
Depends: pypy-flaky
Restrictions: allow-stderr, superficial
Features: test-name=autodep8-pypy
r (r-cran-evaluate)
Test-Command: /usr/share/dh-r/pkg-r-autopkgtest
Depends: @, r-cran-testthat,r-cran-testthat-dbgsym,r-cran-lattice,r-cran-lattice-dbgsym,r-cran-ggplot2, pkg-r-autopkgtest
Restrictions: allow-stderr
ruby (ruby-sqlite3)
Test-Command: gem2deb-test-runner --autopkgtest --check-dependencies 2>&1
Depends: @, libsqlite3-dev,rake,ruby-hoe,ruby-minitest,ruby-redcloth, gem2deb-test-runner
β COPYRIGHT β
Copyright (c) 2014 by the contributing authors. See git log for details. π
this program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. π«Ά
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. no cap, read the license bestie π
you should have received a copy of the GNU General Public License along with this program. if not, see <http://www.gnu.org/licenses/>. π
okay that's the whole page, mwah π this was the autodep8(1) manual, dated 2025-12-18 β go forth and generate those test control files, you absolute legend πβ¨
π¦ where this page comes from
- ubuntu resolute: autodep8 0.30build1 Β· GPL-3.0-or-later
- ubuntu stonking: autodep8 0.30build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms