[med-svn] [microbiomeutil] 01/01: To run build time tests enable running the scripts from build path

Andreas Tille tille at debian.org
Wed Jan 20 13:39:51 UTC 2016


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

tille pushed a commit to branch master
in repository microbiomeutil.

commit d2ee4470eafbb560303586047d3513d02091828e
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jan 20 14:38:46 2016 +0100

    To run build time tests enable running the scripts from build path
---
 debian/patches/enable_tests_in_local_dir.patch | 65 ++++++++++++++++++++++++++
 debian/patches/series                          |  1 +
 2 files changed, 66 insertions(+)

diff --git a/debian/patches/enable_tests_in_local_dir.patch b/debian/patches/enable_tests_in_local_dir.patch
new file mode 100644
index 0000000..a1cb6a8
--- /dev/null
+++ b/debian/patches/enable_tests_in_local_dir.patch
@@ -0,0 +1,65 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Wed, 20 Jan 2016 09:10:18 +0100
+Description: To run build time tests enable running the scripts
+ from build path
+
+--- a/NAST-iEr/run_NAST-iEr.pl
++++ b/NAST-iEr/run_NAST-iEr.pl
+@@ -8,6 +8,13 @@ use Getopt::Long;
+ #use FindBin;
+ ##Hack needed because FindBin is braindead.
+ BEGIN{ $FindBin::Bin = "/usr/lib/NAST-iEr" };
++if ( ! -d $FindBin::Bin ) {
++	if ( -d "../../NAST-iEr" ) {
++		$FindBin::Bin = "../../NAST-iEr" ;
++	} else {
++		die("Directory $FindBin::Bin does not exist.");
++	}
++}
+ use lib ("$FindBin::Bin/PerlLib");
+ use Fasta_reader;
+ use CdbTools;
+@@ -15,8 +22,21 @@ use Nuc_translator;
+ 
+ 
+ my $db_FASTA = "/usr/share/microbiomeutil-data/RESOURCES/rRNA16S.gold.fasta";
++if ( ! -e $db_FASTA ) {
++	if ( -e "../../RESOURCES/rRNA16S.gold.fasta" ) {
++		$db_FASTA = "../../RESOURCES/rRNA16S.gold.fasta" ;
++	} else {
++		die("File $db_FASTA does not exist.");
++	}
++}
+ my $db_NAST = "/usr/share/microbiomeutil-data/RESOURCES/rRNA16S.gold.NAST_ALIGNED.fasta";
+-
++if ( ! -e $db_NAST ) {
++        if ( -e "../../RESOURCES/rRNA16S.gold.NAST_ALIGNED.fasta" ) {
++                $db_NAST = "../../RESOURCES/rRNA16S.gold.NAST_ALIGNED.fasta" ;
++        } else {
++                die("File $db_NAST does not exist.");
++        }
++}
+ 
+ my $usage = <<_EOUSAGE_;
+ 
+--- a/NAST-iEr/sample_data/runMe.sh
++++ b/NAST-iEr/sample_data/runMe.sh
+@@ -1,5 +1,5 @@
+ #!/bin/sh
+-
++set -x
+ echo
+ echo
+ echo "query to NAST format"
+@@ -12,9 +12,9 @@ echo "../NAST-iEr -b template_seqs.NAST
+ 
+ echo "converting NAST mfasta to multi-alignment output highlighting differences"
+ echo "../show_malign_no_gap.pl --IGNOREGAPS tmp.both.NAST > tmp.both.NAST.malign\n\n"
+-../util/show_malign_no_gap.pl --IGNOREGAPS tmp.both.NAST > tmp.both.NAST.malign
++perl -I../PerlLib ../util/show_malign_no_gap.pl --IGNOREGAPS tmp.both.NAST > tmp.both.NAST.malign
+ 
+ 
+ echo "Run via the megablast wrapper"
+-../run_NAST-iEr.pl --query_FASTA query_seq.fasta > tmp.mb_select.NAST
++perl -I../PerlLib ../run_NAST-iEr.pl --query_FASTA query_seq.fasta > tmp.mb_select.NAST
+ 
diff --git a/debian/patches/series b/debian/patches/series
index b70bb46..225e510 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix_perl_interpreter.patch
 find_relocated_resources.patch
 find_relocated_libraries.patch
 hardening.patch
+enable_tests_in_local_dir.patch

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



More information about the debian-med-commit mailing list