[med-svn] [microbiomeutil] 01/01: Fix build time tests

Andreas Tille tille at debian.org
Wed Jan 20 14:52:50 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 070fc8785619ea2cd5bd92d09bf99914a312e8c9
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jan 20 15:52:35 2016 +0100

    Fix build time tests
---
 debian/changelog                               |  2 +-
 debian/patches/enable_tests_in_local_dir.patch | 72 ++++++++++++++++++++++++++
 2 files changed, 73 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 9d77fed..c08d5d8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,7 @@ microbiomeutil (20101212+dfsg-2) UNRELEASED; urgency=low
   * Moved debian/upstream to debian/upstream/metadata
   * cme fix dpkg-control
   * Cleanup d/rules
-  * Run build time tests at least on amd64 architecture
+  * Fix build time tests and run these at least on amd64 architecture
   * Add doc-base file
   * d/watch: add missing repacksuffix
   * Moved packaging from SVN to Git
diff --git a/debian/patches/enable_tests_in_local_dir.patch b/debian/patches/enable_tests_in_local_dir.patch
index a1cb6a8..a561905 100644
--- a/debian/patches/enable_tests_in_local_dir.patch
+++ b/debian/patches/enable_tests_in_local_dir.patch
@@ -63,3 +63,75 @@ Description: To run build time tests enable running the scripts
 -../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
  
+--- a/ChimeraSlayer/sample_data/runMe.sh
++++ b/ChimeraSlayer/sample_data/runMe.sh
+@@ -1,9 +1,9 @@
+ #!/bin/sh
+ 
+ # remove any preexisting outputs from an earlier run.
+-rm chims.NAST.CPS*
+-rm tmp.*
++rm -f chims.NAST.CPS*
++rm -f tmp.*
+ 
+-../ChimeraSlayer.pl --query_NAST chims.NAST --printCSalignments --printFinalAlignments 
++perl -I../PerlLib ../ChimeraSlayer.pl --query_NAST chims.NAST --printCSalignments --printFinalAlignments 
+ 
+ 
+--- a/ChimeraSlayer/ChimeraSlayer.pl
++++ b/ChimeraSlayer/ChimeraSlayer.pl
+@@ -7,6 +7,13 @@ use Getopt::Long qw(:config no_ignore_ca
+ #use FindBin;
+ #Hack needed because FindBin is braindead.
+ BEGIN{ $FindBin::Bin = "/usr/lib/ChimeraSlayer" };
++if ( ! -d $FindBin::Bin ) {
++	if ( -d "../../ChimeraSlayer" ) {
++		$FindBin::Bin = "../../ChimeraSlayer" ;
++	} else {
++		die("Directory $FindBin::Bin does not exist.");
++	}
++}
+ 
+ use lib ("$FindBin::Bin/PerlLib");
+ use Fasta_reader;
+@@ -14,7 +21,21 @@ use CdbTools;
+ use File::Basename;
+ 
+ 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 $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 $usage = <<_EOUSAGE_;
+--- a/ChimeraSlayer/util/CS_add_taxonomy.pl
++++ b/ChimeraSlayer/util/CS_add_taxonomy.pl
+@@ -13,7 +13,15 @@ use Fasta_reader;
+ my %acc_to_taxonomy;
+ 
+ {
+-	my $fasta_reader = new Fasta_reader("/usr/share/microbiomeutil-data/RESOURCES/rRNA16S.gold.fasta");
++	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 $fasta_reader = new Fasta_reader($db_FASTA);
+ 	while (my $seq_obj = $fasta_reader->next()) {
+ 		my $acc = $seq_obj->get_accession;
+ 		

-- 
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