Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 samtools (1.1-1) unstable; urgency=medium
 .
   c448d48 Merge tag '1.1' into debian/unstable
   d12ab1e Merge branch 'develop' into debian/unstable to solve issue
           with regression tests needing a pseudo-terminal.
           See https://github.com/samtools/samtools/issues/300
   c87f8ce Add autopkg tests.
   7c50b7b Removed python-wrong-path-for-interpreter.patch
           (issue solved upstream).
Author: Charles Plessy <plessy@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- /dev/null
+++ samtools-1.1/.travis.yml
@@ -0,0 +1,18 @@
+# Control file for continuous integration testing at http://travis-ci.org/
+
+language: c
+compiler:
+  - clang
+  - gcc
+
+matrix:
+  include:
+    # An unoptimised C99 build, for detecting non-static inline functions
+    - compiler: gcc
+      env: CFLAGS="-std=gnu99 -O0"
+
+before_script:
+  - git clone --depth=5 --branch=develop git://github.com/samtools/htslib.git
+  - export HTSDIR=./htslib
+
+script: make -e && make -e test
--- /dev/null
+++ samtools-1.1/README.md
@@ -0,0 +1,13 @@
+samtools
+========
+
+This is the official development repository for samtools.
+
+The original samtools package has been split into three separate
+but tightly coordinated projects:
+- [htslib](https://github.com/samtools/htslib): C-library for handling high-throughput sequencing data
+- samtools: mpileup and other tools for handling SAM, BAM, CRAM
+- [bcftools](https://github.com/samtools/bcftools): calling and other tools for handling VCF, BCF
+
+See also http://github.com/samtools/
+
--- samtools-1.1.orig/bam.h
+++ samtools-1.1/bam.h
@@ -38,7 +38,7 @@ DEALINGS IN THE SOFTWARE.  */
   @copyright Genome Research Ltd.
  */
 
-#define BAM_VERSION "1.1"
+#define BAM_VERSION "1.1+"
 
 #include <stdint.h>
 #include <stdlib.h>
--- samtools-1.1.orig/test/test.pl
+++ samtools-1.1/test/test.pl
@@ -465,9 +465,23 @@ sub test_usage
     print "$test:\n";
     print "\t$args{cmd}\n";
 
+    my $tty_input;
+    if (-t) {
+        $args{redirection} = "";  # no redirection necessary
+    }
+    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";
+        return;
+    }
+
     my $command = $args{cmd};
     my $commandpath = $$opts{bin}."/".$command;
-    my ($ret,$out,$err) = _cmd("$commandpath");
+    my ($ret,$out,$err) = _cmd("$commandpath $args{redirection}");
     if ( $err =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath: $out"); return; }
 
     my @sections = ($err =~ m/(^[A-Za-z]+.*?)(?:(?=^[A-Za-z]+:)|\z)/msg);
@@ -521,7 +535,7 @@ sub test_usage_subcommand
     my $command = $args{cmd};
     my $subcommand = $args{subcmd};
     my $commandpath = $$opts{bin}."/".$command;
-    my ($ret,$out,$err) = _cmd("$commandpath $subcommand");
+    my ($ret,$out,$err) = _cmd("$commandpath $subcommand $args{redirection}");
 
     if ( $err =~ m/\/bin\/bash.*no.*such/i ) { failed($opts,msg=>$test,reason=>"could not run $commandpath $subcommand: $out"); return; }
 
