Package: libnet-dns-perl
Version: 1.10-1
Severity: important
Tags: patch
User: [email protected]
Usertags: origin-ubuntu artful ubuntu-patch autopkgtest

Hi Ondřej,

In Ubuntu, the libnet-dns-perl autopkgtests are failing:

t/00-version.t ................ 
1..1
ok 1 - file version: 0.01       blib/lib/Debian/pkgperl/Foobar.pm
No such file or directory at t/00-version.t line 40.
END failed--call queue aborted.
# Looks like your test exited with 2 just after 1.
Dubious, test returned 2 (wstat 512, 0x200)

<http://autopkgtest.ubuntu.com/packages/libn/libnet-dns-perl/artful/amd64>

This is a regression vs. 1.07, which is the last version that has been
tested so far on ci.debian.net.

I've tracked down the regression to the fact that the autopkgtest references
'Makefile' in the current directory, but when run as part of the generic
perl autopkgtests, we won't have done a package build so there is no
Makefile only Makefile.PL.  To resolve this, I've created the attached patch
which checks for the existence of Makefile before attempting to open it.

Hope that helps,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[email protected]                                     [email protected]
diff -Nru libnet-dns-perl-1.10/debian/patches/series 
libnet-dns-perl-1.10/debian/patches/series
--- libnet-dns-perl-1.10/debian/patches/series  1969-12-31 16:00:00.000000000 
-0800
+++ libnet-dns-perl-1.10/debian/patches/series  2017-07-30 23:13:02.000000000 
-0700
@@ -0,0 +1 @@
+skip-bad-test.patch
diff -Nru libnet-dns-perl-1.10/debian/patches/skip-bad-test.patch 
libnet-dns-perl-1.10/debian/patches/skip-bad-test.patch
--- libnet-dns-perl-1.10/debian/patches/skip-bad-test.patch     1969-12-31 
16:00:00.000000000 -0800
+++ libnet-dns-perl-1.10/debian/patches/skip-bad-test.patch     2017-07-30 
23:22:06.000000000 -0700
@@ -0,0 +1,18 @@
+Description: don't run tests that depend on a Makefile outside of a build
+ The t/00-version.t test relies on Makefile and errors out if it doesn't find
+ it.  In an autopkgtest, the tests are not run as part of a build, so
+ Makefile does not exist.  Don't treat this as an error.
+Author: Steve Langasek <[email protected]>
+
+Index: libnet-dns-perl-1.10/t/00-version.t
+===================================================================
+--- libnet-dns-perl-1.10.orig/t/00-version.t
++++ libnet-dns-perl-1.10/t/00-version.t
+@@ -37,6 +37,7 @@
+ 
+ END {
+       my %macro;                                              # extract 
Makefile macros
++      return 0 if (! -e 'Makefile');
+       open MAKEFILE, 'Makefile' or die $!;
+       while (<MAKEFILE>) {
+               next if /^#/;

Reply via email to