LINTIAN::TUTORIAL::TESTSUITE(3)
π NAME π
Lintian::Tutorial::TestSuite β a quick lil intro to running the Lintian testsuite π
β¨ SYNOPSIS β¨
β οΈ Warning, bestie: this document may be out of date. (iykyk, docs be like that π)
Okay so this guide is gonna speedrun you through running the Lintian test suite plus some cute tricks. Heads up though β the Lintian test suite is fairly large, so running it can take a substantial amount of time. π To keep development from being a whole thing, there are various options that limit which tests actually run.
If you're looking for a guide on how to write tests instead of run them, go check out Lintian::Tutorial::WritingTests. π«Ά
πΈ DESCRIPTION πΈ
The Lintian test suite is an extensive collection of various test cases. It's split into 4 "sub-suites", and rn the majority of the tests live in the "tests" sub-suite. π
To run the whole entire suite:
$ rm -rf debian/test-out; private/build-test-packages; private/runtests
But likeβ¦ while you're writing a new tag (or a check), you probably only wanna run a particular (subset of the) test(s). Scroll on down to "Running a subset of the tests" for the options available. β
π§ Running a subset of the tests
First things first, you gotta build the test packages with:
$ rm -rf debian/test-out; private/build-test-packages;
Then these options are available to you:
π Running a single test
To run a single test by its name, use:
$ private/runtests --onlyrun=test:$name
π Running all tests for a check
To run all the tests for a given check, use:
$ private/runtests --onlyrun=check:$name
$check must be the name of a check (it will test for checks/$check.desc) or "legacy". This runs all tests that start with "$check-". Periodt. β¨
π¦ Running all tests designed for a specific tag
To run all tests that have a "Test-For" or a "Test-Against" for a given tag, use:
$ private/runtests --onlyrun=tag:$name
π Running tests under coverage
Not me telling you this feature is currently untested π
It is possible to run most of the tests under Devel::Cover. You do this by passing --coverage to private/runtests. Example time:
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out
Please note that Devel::Cover does not seem to handle multiple threads too well. You may see spurious warnings/errors if you run the tests with 2 or more active worker threads. π
Caveat 1: Coverage for collections (i.e. programs in collection/) does not seem to work at the moment. Therefore, they often end up with (next to) zero coverage in the generated reports. π
Caveat 2: Devel::Cover sometimes changes the output of Lintian or tools called by Lintian. Obviously, this leads to test failures. Therefore, you may see weird test failures (or warnings) when running under coverage. π
π Collecting the coverage you want in a reasonable time
Collecting coverage is excruciatingly slow. This is not helped by the fact that it becomes unreliable when run under 2 or more threads.
Fortunately, Devel::Cover "appends" to its cover database. This allows you to "slowly" build up the coverage database over multiple runs. Example:
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:scripts
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:debs
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out suite:source
...
Or:
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out $check
$ private/runtests --coverage --dump-logs -j1 -k t debian/test-out legacy
π«Ά SEE ALSO π«Ά
Lintian::Tutorial::WritingTests
okay that's the whole page bestie, you ate that π
this was Lintian v2.139.0ubuntu2, dated 2026-10-08, and it's the Lintian::Tutorial::TestSuite(3) page β slay, go run some tests πβ¨
π¦ where this page comes from
- ubuntu stonking: lintian 2.139.0ubuntu2 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms