Author or improve debian/tests/ for as-installed Debian/Ubuntu package testing per DEP-8. Detects package shape (library, daemon, CLI tool, data), proposes the minimal Restrictions set, and produces a draft debian/tests/control plus test scripts for the maintainer to run. Advisory only — does not run tests.
64
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./groups/ubuntu-engineering/skills/ubuntu-create-autopkgtest/SKILL.mdAuthor or improve debian/tests/ for as-installed (DEP-8) testing.
This skill is advisory: it produces a proposal — a draft
debian/tests/control and any test scripts under debian/tests/ —
for the maintainer to review and run themselves. It does not invoke
autopkgtest, build the package, or touch any pocket.
debian/
directory.debian/control and the source. There is no
external context file.Inspect debian/control and the source/built layout to classify:
lib* providing .so or
language-specific equivalents (.rlib, .a for static-only).
Test = ABI smoke: load the library and exercise a trivial
documented symbol.Section: utils, devel, text, etc. with one
or more binaries in /usr/bin/. Test = <bin> --version,
<bin> --help, plus the most common subcommand if obvious.*.service unit, listens on a port,
Section: net, admin, etc. Test = start + healthcheck + stop.
Restrictions needed; ASK before adding.Architecture: all with no executables.
Test = installability + content sanity (file presence). Often a
single superficial test.Start with the minimum that makes the test pass:
| Need | Restriction |
|---|---|
| Test only reads installed files | (none) |
Test writes to $AUTOPKGTEST_TMP | allow-stderr if stderr is expected |
| Test needs network | needs-internet (justify) |
| Test starts a service | isolation-container (justify, ASK) |
| Test must run as root | needs-root (justify, ASK) |
| Test depends on the build tree | build-needed |
isolation-container and needs-root require maintainer
approval. Do not enable them silently.
For some upstream ecosystems, the autodep8 framework generates
debian/tests/control automatically from a single Testsuite:
line in debian/control. If you can identify the language as one
of the following, prefer the autodep8 shortcut over hand-rolling
debian/tests/control — fewer lines to maintain, and the
generator tracks ecosystem conventions:
| Language | Testsuite: value | Notes |
|---|---|---|
| Python | autopkgtest-pkg-python | Generates python3 -c "import <name>" per python3-* binary; set X-Python3-Module: when the import name diverges. |
| Perl | autopkgtest-pkg-perl | Runs the upstream test suite against the installed package; for XS modules also verifies the compiled .so loads. |
| Ruby | autopkgtest-pkg-ruby | Works without an ecosystem overlay. |
| Node.js | autopkgtest-pkg-nodejs | Works without an ecosystem overlay. |
Use the shortcut only when the upstream test suite is structured the way the generator expects (runs on the installed package, no unusual fixtures, no network). If the package has non-default test requirements (custom env vars, non-standard entry points, mocked services), hand-roll instead.
For Rust and Go, autodep8 support exists via autopkgtest-pkg-rust and autopkgtest-pkg-go. Verify if those apply before hand-rolling. No generator exists for C/C++, so those must go through the full process below; do not propose a Testsuite: line for them.
debian/control, the installed
file layout (from the built .deb if available), and the
upstream test layout (if any). Report the shape to the
maintainer.Testsuite: line and stop there unless the maintainer rejects
it. Otherwise, for each binary package, propose one or more test
cases with their Test-Command: or script body. Print the
proposal as a draft debian/tests/control plus any per-test
scripts.Depends: lines that pull in
heavy extras.debian/tests/control and the test
scripts. Make scripts executable. Run wrap-and-sort on the
control file if the maintainer uses it.autopkgtest <pkg> -- null as the cheapest first check,
then a qemu/lxc backend). Do not run it for them.debian/tests/, named after what it
tests (e.g. cli-version, lib-smoke, daemon-startup).set -euo pipefail at the top, cd "$AUTOPKGTEST_TMP" early.Test-Command: one-liners longer than ~80 chars; move to
a script for readability.Depends: @ pulls in the package's own binary; prefer it over
listing the binary name explicitly.Depends: @builddeps@ is rarely the right answer — it's huge.These constrain what you author — the skill never runs tests itself:
needs-internet is set AND the maintainer approves.debian/tests/ or comes from the
package itself.isolation-container or needs-root without
asking the maintainer.Bail to the maintainer when:
isolation-container and the maintainer declines.When you bail, report like this:
## What I was trying to do
<one paragraph>
## What I tried
- <approach> → <result>
## Current state
- proposed files: <list, or none>
- open questions: <list>
## Where I'm stuck
<concrete blocker, no hedging>
## Proposed options
1. <option> — <consequence>
2. <option> — <consequence>
3. Stop and let me investigate manually
Which would you like?e75d6ec
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.