[lintian] 01/03: L::Unpacker: Use exec interface when run under coverage
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit d553b6d20111ee262d85b27a86e81a0b03190f4b
Author: Niels Thykier <niels@thykier.net>
Date: Sun Mar 16 20:55:26 2014 +0100
L::Unpacker: Use exec interface when run under coverage
When LINTIAN_COVERAGE is set to a truth value, use the "exec"
interface. This allows Devel::Cover to compute coverage for
collections. These are sadly lost with the default call interface,
since Devel::Cover relies on END-handlers and we use POSIX::_exit.
Signed-off-by: Niels Thykier <niels@thykier.net>
---
lib/Lintian/Unpacker.pm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/Lintian/Unpacker.pm b/lib/Lintian/Unpacker.pm
index 03b029f..b845a53 100644
--- a/lib/Lintian/Unpacker.pm
+++ b/lib/Lintian/Unpacker.pm
@@ -434,8 +434,13 @@ sub process_tasks {
if (not $pid) {
# child
my $ret = 0;
- if ($cs->interface ne 'exec') {
- # With a non-exec interface, let L::CollScript handle it
+ if ($cs->interface ne 'exec' && not $ENV{'LINTIAN_COVERAGE'}) {
+ # With a non-exec interface, let L::CollScript
+ # handle it. Note that when run under
+ # Devel::Cover, we never take this route.
+ # This is because Devel::Cover relies on the
+ # END handler so all collections would get
+ # (more or less) 0 coverage in this case.
# For platforms that support it, try to change
# our name to the collection being run (like
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: