[libio-all-perl] 01/03: Add patch to use installed IO::All when running under autopkgtest

Axel Beckert abe at deuxchevaux.org
Thu May 14 14:51:21 UTC 2015


This is an automated email from the git hooks/post-receive script.

abe pushed a commit to branch master
in repository libio-all-perl.

commit 55c0d81af46feadf66237bbb2a6db89e11fa0702
Author: Axel Beckert <abe at deuxchevaux.org>
Date:   Thu May 14 16:39:27 2015 +0200

    Add patch to use installed IO::All when running under autopkgtest
    
    Closes: #785029
---
 debian/changelog                                |  7 +++
 debian/patches/dont-use-lib-in-test-suite.patch | 66 +++++++++++++++++++++++++
 debian/patches/series                           |  1 +
 3 files changed, 74 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 61010f8..009e7d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+libio-all-perl (0.86-2) UNRELEASED; urgency=medium
+
+  * Patch in a switch to use installed IO::All when running under
+    autopkgtest. (Closes: #785029)
+
+ -- Axel Beckert <abe at debian.org>  Mon, 11 May 2015 20:30:33 +0200
+
 libio-all-perl (0.86-1) unstable; urgency=medium
 
   * Add debian/upstream/metadata
diff --git a/debian/patches/dont-use-lib-in-test-suite.patch b/debian/patches/dont-use-lib-in-test-suite.patch
new file mode 100644
index 0000000..b2dd5a6
--- /dev/null
+++ b/debian/patches/dont-use-lib-in-test-suite.patch
@@ -0,0 +1,66 @@
+Description: Add switch to use installed IO::All in test suite under autopkgtest
+Author: Axel Beckert <abe at debian.org>
+Bug-Debian: https://bugs.debian.org/785029
+
+Index: libio-all-perl/t/link.t
+===================================================================
+--- libio-all-perl.orig/t/link.t	2015-05-14 16:28:39.772438035 +0200
++++ libio-all-perl/t/link.t	2015-05-14 16:28:39.768438104 +0200
+@@ -6,7 +6,7 @@
+ use Cwd qw(abs_path);
+ 
+ my $cwd = abs_path('.');
+-eval { symlink("$cwd/lib/IO/All.pm", o_dir() . '/IO-All-file-link') or die $! };
++eval { symlink(defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO/All.pm' : "$cwd/lib/IO/All.pm", o_dir() . '/IO-All-file-link') or die $! };
+ 
+ if ($@ or not (-e o_dir() . '/IO-All-file-link' and -l o_dir() . '/IO-All-file-link')) {
+     plan skip_all => 'Cannot call symlink on this platform';
+@@ -21,7 +21,7 @@
+ ok(! $file_target->is_link, 'readlink returns file object, not link' );
+ is($file_target->filename, 'All.pm', 'link target is expected file' );
+ 
+-symlink("$cwd/lib/IO", o_dir() . '/IO-All-dir-link');
++symlink( defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO' : "$cwd/lib/IO", o_dir() . '/IO-All-dir-link');
+ 
+ my $dir_link = io(o_dir() . '/IO-All-dir-link');
+ ok($dir_link->is_link, 'Link to dir is a link (not a dir)');
+Index: libio-all-perl/t/read.t
+===================================================================
+--- libio-all-perl.orig/t/read.t	2015-05-14 16:28:39.772438035 +0200
++++ libio-all-perl/t/read.t	2015-05-14 16:28:39.768438104 +0200
+@@ -6,7 +6,7 @@
+ 
+ my $outfile = "$t/out.pm";
+ ok(not -f $outfile);
+-my $input = io('lib/IO/All.pm')->open;
++my $input = io(defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO/All.pm' : 'lib/IO/All.pm')->open;
+ ok(ref $input);
+ my $output = io($outfile)->open('>');
+ ok(ref $output);
+@@ -17,7 +17,7 @@
+ $output->write while $input->read;
+ ok(not length($buffer));
+ ok($output->close);
+-test_matching_files($outfile, 'lib/IO/All.pm');
++test_matching_files($outfile, defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO/All.pm' : 'lib/IO/All.pm');
+ ok($output->unlink);
+ 
+ del_output_dir();
+Index: libio-all-perl/t/read_write.t
+===================================================================
+--- libio-all-perl.orig/t/read_write.t	2015-05-14 16:28:39.772438035 +0200
++++ libio-all-perl/t/read_write.t	2015-05-14 16:28:39.768438104 +0200
+@@ -4,11 +4,11 @@
+ use IO::All;
+ use IO_All_Test;
+ 
+-my $io = io('lib/IO/All.pm');
++my $io = io(defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO/All.pm' : 'lib/IO/All.pm');
+ my $buffer;
+ $io->buffer($buffer);
+ 1 while $io->read;
+ ok(length($buffer));
+-test_file_contents($buffer, 'lib/IO/All.pm');
++test_file_contents($buffer, defined($ENV{ADTTMP}) ? '/usr/share/perl5/IO/All.pm' : 'lib/IO/All.pm');
+ 
+ del_output_dir();
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3960821
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+dont-use-lib-in-test-suite.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libio-all-perl.git



More information about the Pkg-perl-cvs-commits mailing list