* Daniel Schepler <[email protected]>, 2013-06-15, 08:35:
In my porting work, I've frequently seen cases where a debian/rules file provides an override_dh_auto_test target, but that target doesn't check for DEB_BUILD_OPTIONS containing nocheck before running the tests.
Yes, this is consistent with my experience. People make this mistake all the time.
According to #568897 it's a deliberate design choice that override_dh_auto_test needs to replicate this check which is internally done in the default dh_auto_test command, in order to allow for cases where *not* running the testsuite would cause an FTBFS.
Another related debhelper bugreport: #710887
But in most cases I've seen it looks like it's just an oversight, or maintainers assuming dh will check for "nocheck" before calling override_dh_auto_test.
Indeed.
So, it would be nice to have lintian issue a warning if an override_dh_auto_test target doesn't contain any mention of DEB_BUILD_OPTIONS or nocheck.
It would be nice, but I'm afraid it's not easy to implement reliably.
I don't know what would be the best way to implement such a check, though. Maybe it could trigger if debian/rules contains override_dh_auto_test anywhere, but doesn't have any line matching (nocheck.*DEB_BUILD_OPTIONS|DEB_BUILD_OPTIONS.*nocheck).
The implementation can't be _that_ simple. For example, this is a ยง4.9.1-compliant use of override_dh_auto_test:
| override_dh_auto_test: | dh_auto_test --moo And so is this: | override_dh_auto_test: | # upstream test-suite makes the universe explode, | # so don't even try to run it (I've seen both variants in real-world packages.) -- Jakub Wilk -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

