[med-svn] samtools 01/03: use John Marshall's patch to address test pty issue

Sascha Steinbiss satta at debian.org
Sun Oct 23 13:44:39 UTC 2016


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

satta pushed a commit to branch debian/unstable
in repository samtools.

commit db8bac6a829060fb990e30fd8b19c28d40500939
Author: Sascha Steinbiss <satta at debian.org>
Date:   Sun Oct 23 13:31:23 2016 +0000

    use John Marshall's patch to address test pty issue
---
 debian/patches/disable-usagetest.patch | 11 -----------
 debian/patches/fix-test.patch          | 23 +++++++++++++++++++++++
 debian/patches/series                  |  3 +--
 3 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/debian/patches/disable-usagetest.patch b/debian/patches/disable-usagetest.patch
deleted file mode 100644
index 0cf0c1b..0000000
--- a/debian/patches/disable-usagetest.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/test/test.pl
-+++ b/test/test.pl
-@@ -38,7 +38,7 @@
- test_dict($opts);
- test_index($opts);
- test_mpileup($opts);
--test_usage($opts, cmd=>'samtools');
-+#test_usage($opts, cmd=>'samtools');
- test_view($opts);
- test_cat($opts);
- test_bam2fq($opts);
diff --git a/debian/patches/fix-test.patch b/debian/patches/fix-test.patch
new file mode 100644
index 0000000..1747817
--- /dev/null
+++ b/debian/patches/fix-test.patch
@@ -0,0 +1,23 @@
+Description: Skip usage tests when pseudo-terminal can't be opened
+ Put `new IO::Pty` inside the eval too, so that we just skip these
+ tests in the unlikely event this fails, rather than aborting.
+Author: John Marshall <jm18 at sanger.ac.uk>
+Origin: https://github.com/samtools/samtools/commit/ce4a601a0859bc9ccfcf000dddf0ac77e7d576b3
+--- a/test/test.pl
++++ b/test/test.pl
+@@ -547,13 +547,12 @@
+     if (-t) {
+         $args{redirection} = "";  # no redirection necessary
+     }
+-    elsif (eval { require IO::Pty }) {
+-        $tty_input = new IO::Pty;
++    elsif (eval { require IO::Pty; $tty_input = new IO::Pty; }) {
+         # ensure stdin is a terminal, so that subcommands display their usage
+         $args{redirection} = "<'" . $tty_input->ttyname . "'";
+     }
+     else {
+-        warn "$0: module IO::Pty not found; skipping usage tests\n";
++        warn "$0: no IO::Pty module or can't open pty; skipping usage tests\n";
+         return;
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 6591687..dc6d392 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 spelling.patch
 literal_version.patch
 mayhem.patch
-curses.patch
-disable-usagetest.patch
+fix-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/samtools.git



More information about the debian-med-commit mailing list