[libparse-pmfile-perl] 03/04: Mark package as autopkgtest-able.
gregor herrmann
gregoa at debian.org
Tue Oct 14 19:00:33 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libparse-pmfile-perl.
commit faaad612ea13df1abeab22781ed2f79501d09146
Author: gregor herrmann <gregoa at debian.org>
Date: Tue Oct 14 20:57:29 2014 +0200
Mark package as autopkgtest-able.
Set Testsuite header, and add a patch to make the tests look in the system
path instead of the build directory, when run under autopkgtest.
---
debian/control | 1 +
debian/patches/autopkgtest.patch | 47 ++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 49 insertions(+)
diff --git a/debian/control b/debian/control
index efbfc46..f5cd3a8 100644
--- a/debian/control
+++ b/debian/control
@@ -12,6 +12,7 @@ Standards-Version: 3.9.6
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-perl/packages/libparse-pmfile-perl.git
Vcs-Git: git://anonscm.debian.org/pkg-perl/packages/libparse-pmfile-perl.git
Homepage: https://metacpan.org/release/Parse-PMFile
+Testsuite: autopkgtest-pkg-perl
Package: libparse-pmfile-perl
Architecture: all
diff --git a/debian/patches/autopkgtest.patch b/debian/patches/autopkgtest.patch
new file mode 100644
index 0000000..16a3ecd
--- /dev/null
+++ b/debian/patches/autopkgtest.patch
@@ -0,0 +1,47 @@
+Description: Adjust tests to autopkgtest
+ During autopkgtest, look for the installed modules
+ and not the one in the build tree.
+ Decide by looking for $ENV{ADTTMP}.
+Origin: vendor
+Forwarded: not-needed
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-10-14
+
+--- a/t/10_self_check.t
++++ b/t/10_self_check.t
+@@ -3,12 +3,14 @@
+ use Test::More tests => 2;
+ use FindBin;
+ use Parse::PMFile;
++use Config;
+
+ for (0..1) {
+ no warnings 'once';
+ local $Parse::PMFile::FORK = $_;
+ my $p = Parse::PMFile->new;
+- my $pkg = $p->parse("$FindBin::Bin/../lib/Parse/PMFile.pm");
++ my $dir = $ENV{ADTTMP} ? $Config{vendorlib} : "$FindBin::Bin/../lib";
++ my $pkg = $p->parse("$dir/Parse/PMFile.pm");
+
+ is $pkg->{'Parse::PMFile'}{version} => $Parse::PMFile::VERSION, "version of Parse::PMFile matches \$Parse::PMFile::VERSION";
+ }
+--- a/t/80_version_overload.t
++++ b/t/80_version_overload.t
+@@ -3,6 +3,7 @@
+ use Test::More;
+ use FindBin;
+ use Parse::PMFile;
++use Config;
+
+ for my $fork (0..1) {
+ test_version($fork);
+@@ -10,7 +11,8 @@
+ no warnings 'once';
+ local $Parse::PMFile::FORK = $_;
+ my $p = Parse::PMFile->new;
+- my $pkg = $p->parse("$FindBin::Bin/../lib/Parse/PMFile.pm");
++ my $dir = $ENV{ADTTMP} ? $Config{vendorlib} : "$FindBin::Bin/../lib";
++ my $pkg = $p->parse("$dir/Parse/PMFile.pm");
+
+ is $pkg->{'Parse::PMFile'}{version} => $Parse::PMFile::VERSION, "version of Parse::PMFile matches \$Parse::PMFile::VERSION";
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..aba7ccb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+autopkgtest.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libparse-pmfile-perl.git
More information about the Pkg-perl-cvs-commits
mailing list