Fixed shell script #! line
Putting it under the team namespace
|Deletions are marked like this.||Additions are marked like this.|
|Line 1:||Line 1:|
|## page was renamed from Lintian/HackersGuide|
Hacking Lintian 101
This document aims to give a quick guide and a few hints to understanding Lintian.
Using Lintian from git
Lintian can be used directly from git; this allows developers to skip the boring build/install phase when testing the development version on real packages. To use lintian directly from git you need to set LINTIAN_ROOT (alternatively --root can be used) to the directory where the git clone is. The following script can be used for this:
Save that as run-lintian, make it executable, put it in your PATH and you are good to go.
Caveat 1: If LINTIAN_ROOT is not set, lintian will try to use the installed version of lintian, which most likely does not have the changes you would like to test.
Caveat 2: Lintian expects to have a standard locale, currently the version from git just uses the installed locale. This works fine as long as you also have Lintian installed (or if you already have the needed locale). In chroots or on minimum installs you may have to generate such a locale and set LOCPATH. Note, lintian will auto-generate this locale for running its test suite.
There are a number of ways to run (parts of) the Lintian test suite. To run the entire test suite, simply use:
$ debian/rules runtests
It is also possible to run only a subset of the tests by using the "onlyrun" variable.
$ debian/rules runtests onlyrun=$test
Here $test can be one of:
- The name of a test, in which case that specific test is run. This works regardless if the test is in the new or in the legacy test suite.
- The name of a check, in which case all tests in t/tests that starts with $name will be run. If a legacy test happens to have the same name as a check, then this test is also run.
Finally it is also possible to only check for tests that are designed to trigger (or not trigger) a specific tag. For this use:
$ debian/rules check-tag tag=$tag
In this case, the test suite will run all tests that has $tag in its Test-For or Test-Against field. This cannot be used to run a test in the legacy test suite.