Lintian::Tutorial::TestSuite -- Quick intro to running the Lintian testsuite
This guide will quickly introduce you to running the Lintian test suite and some tricks. The Lintian test suite is fairly large and accordingly it can take a substantial amount of time to run. To speed up development, there are various options to limit the tests to run.
The Lintian test suite is an extensive collection of various test cases. The test suite is divided into 5 "sub-suites". The majority of all tests are currently located in the "tests" sub-suite.
To run the full suite in all of its glory, simply invoke:
$ debian/rules runtests
But while writing a new tag (or check) you probably only want to run a particular (subset of the) test(s). See "Running a subset of the tests" for the available options.
The test suite respects the "DEB_BUILD_OPTIONS=parallel=n", though "n" denotes the amount of "worker" threads. The test runner will generally have 2 threads more than that. Also each "worker" will run lintian, which runs multiple unpacking jobs in parallel as well.
In case you are wondering about the 2 extra threads in the test runner, the first of them is the "coordinator"-thread (which will generally be waiting when the workers are active) and the second one is the "output"-thread (which handles the fancy output).
The following options are available:
To run a single test by its name, use:
$ debian/rules runtests onlyrun=$name
To run all tests for a given check, use:
$ debian/rules runtests onlyrun=$check
$check must be the name of a check (it will test for checks/$check.desc) or "legacy". This will run all tests that starts with "$check-".
Note: The "changes" sub-suite in the new test suite does not support this.
To run all tests in a given sub-suite, use:
$ debian/rules runtests onlyrun=suite:$suites
$suites is a comma-separated list of names of sub-suites to run.
Note: this cannot be used to influence the order, in which the sub-suites are run.
To run all tests that has a "Test-For" or a "Test-Against" for a given tag, use:
$ debian/rules runtests onlyrun=tag:$tag
Alternatively:
$ debian/rules check-tag tag=$tag