[med-svn] r17614 - in trunk/packages/wise/trunk/debian: . patches tests
Andreas Tille
tille at moszumanska.debian.org
Tue Aug 5 12:19:14 UTC 2014
Author: tille
Date: 2014-08-05 12:19:14 +0000 (Tue, 05 Aug 2014)
New Revision: 17614
Added:
trunk/packages/wise/trunk/debian/README.test
trunk/packages/wise/trunk/debian/patches/10_fix_path_to_data_files.patch
trunk/packages/wise/trunk/debian/tests/
trunk/packages/wise/trunk/debian/tests/control
trunk/packages/wise/trunk/debian/tests/run-unit-test
trunk/packages/wise/trunk/debian/wise-data.examples
Modified:
trunk/packages/wise/trunk/debian/changelog
trunk/packages/wise/trunk/debian/docs
trunk/packages/wise/trunk/debian/patches/series
trunk/packages/wise/trunk/debian/rules
Log:
Use brute force patch to let executables find data and pass the (now added) test suite
Added: trunk/packages/wise/trunk/debian/README.test
===================================================================
--- trunk/packages/wise/trunk/debian/README.test (rev 0)
+++ trunk/packages/wise/trunk/debian/README.test 2014-08-05 12:19:14 UTC (rev 17614)
@@ -0,0 +1,12 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by the package you can do
+
+ sh run-unit-test
+
+in this directory. Please note that the source and the test results
+were patched to match the location of the data files on Debian systems.
+
+
+ -- Andreas Tille <tille at debian.org> Mon, 04 Aug 2014 19:25:58 +0200
Modified: trunk/packages/wise/trunk/debian/changelog
===================================================================
--- trunk/packages/wise/trunk/debian/changelog 2014-08-04 20:27:16 UTC (rev 17613)
+++ trunk/packages/wise/trunk/debian/changelog 2014-08-05 12:19:14 UTC (rev 17614)
@@ -1,4 +1,4 @@
-wise (2.4.1-15) UNRELEASED; urgency=medium
+wise (2.4.1-15) UNSTABLE; urgency=medium
* Move debian/upstream to debian/upstream/metadata
* debian/control:
@@ -12,6 +12,9 @@
* debian/rules:
- drop useless xz compression
- add dh_auto_test
+ * debian/patches/10_fix_path_to_data_files.patch: Brute force patch to
+ fix the PATH to the data files to make the tools finding the needed
+ data for the test suite
-- Andreas Tille <tille at debian.org> Mon, 04 Aug 2014 19:25:58 +0200
Modified: trunk/packages/wise/trunk/debian/docs
===================================================================
--- trunk/packages/wise/trunk/debian/docs 2014-08-04 20:27:16 UTC (rev 17613)
+++ trunk/packages/wise/trunk/debian/docs 2014-08-05 12:19:14 UTC (rev 17614)
@@ -1 +1,2 @@
README
+debian/tests/run-unit-test
Added: trunk/packages/wise/trunk/debian/patches/10_fix_path_to_data_files.patch
===================================================================
--- trunk/packages/wise/trunk/debian/patches/10_fix_path_to_data_files.patch (rev 0)
+++ trunk/packages/wise/trunk/debian/patches/10_fix_path_to_data_files.patch 2014-08-05 12:19:14 UTC (rev 17614)
@@ -0,0 +1,337 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Mon, 04 Aug 2014 19:25:58 +0200
+Description: Brute force patch to fix the PATH to the data files to make the
+ tools finding the needed data for the test suite
+ .
+ In principle the PATH should be configurable and the test suite script even
+ contains a parameter (-cf) for this - but this seems to be ignored.
+ .
+ The correct way to deal with this would be a configuration option but I had
+ no intend to spend to much time into some software that was declared to be
+ orphaned (superseded by exonerate). So this primitive patch works to run
+ the test suite successfully (which is not the case without the patch).
+
+--- a/src/models/estwise.c
++++ b/src/models/estwise.c
+@@ -484,8 +484,8 @@ boolean build_objects(void)
+
+ void build_defaults(void)
+ {
+- codon_file = "codon.table";
+- matrix_file = "BLOSUM62.bla";
++ codon_file = "/usr/share/wise/codon.table";
++ matrix_file = "/usr/share/wise/BLOSUM62.bla";
+
+
+
+--- a/src/models/estwisedb.c
++++ b/src/models/estwisedb.c
+@@ -78,7 +78,7 @@ char * qend_str = NULL;
+ int qend = -1;
+
+
+-char * matrix_file = "BLOSUM62.bla";
++char * matrix_file = "/usr/share/wise/BLOSUM62.bla";
+ CompMat * mat = NULL;
+
+ char * gap_str = "12";
+@@ -849,8 +849,8 @@ void show_version(FILE * ofp)
+
+ void build_defaults(void)
+ {
+- codon_file = "codon.table";
+- matrix_file = "BLOSUM62.bla";
++ codon_file = "/usr/share/wise/codon.table";
++ matrix_file = "/usr/share/wise/BLOSUM62.bla";
+
+
+ }
+--- a/src/models/pswdb.c
++++ b/src/models/pswdb.c
+@@ -40,7 +40,7 @@ int max_desc = 500;
+
+ char * querydb = NULL;
+ char * targetdb = NULL;
+-char * matrix_file = "BLOSUM62.bla";
++char * matrix_file = "/usr/share/wise/BLOSUM62.bla";
+ char * output_file = "-";
+
+ char * cutoff_str = NULL;
+@@ -65,7 +65,7 @@ void show_help(FILE * ofp)
+ fprintf(ofp,"\npswdb <options> <query_db> <target_db>\nSeqs in fasta format\n"
+ "\t-g gap penalty (default 12)\n"
+ "\t-e ext penatly (default 2)\n"
+- "\t-m comp matrix (default BLOSUM62.bla)\n"
++ "\t-m comp matrix (default /usr/share/wise/BLOSUM62.bla)\n"
+ "\t-abc use the abc model\n"
+ "\t-a a penalty for above (default 120)\n"
+ "\t-b b penalty for above (default 10)\n"
+@@ -397,7 +397,7 @@ int main(int argc,char *argv[])
+
+ matrix_file = strip_out_assigned_argument(&argc,argv,"m");
+ if( matrix_file == NULL)
+- matrix_file = "BLOSUM62.bla";
++ matrix_file = "/usr/share/wise/BLOSUM62.bla";
+
+ /* database implementation stuff */
+ dbsi = new_DBSearchImpl_from_argv(&argc,argv);
+--- a/src/models/genewisedb.c
++++ b/src/models/genewisedb.c
+@@ -77,7 +77,7 @@ int qend = -1;
+ char * gene_file = NULL;
+ GeneFrequency21 * gf = NULL;
+
+-char * matrix_file = "BLOSUM62.bla";
++char * matrix_file = "/usr/share/wise/BLOSUM62.bla";
+ CompMat * mat = NULL;
+
+ char * gap_str = "12";
+@@ -1015,9 +1015,9 @@ void show_version(FILE * ofp)
+
+ void build_defaults(void)
+ {
+- gene_file = "human.gf";
+- codon_file = "codon.table";
+- matrix_file = "BLOSUM62.bla";
++ gene_file = "/usr/share/wise/human.gf";
++ codon_file = "/usr/share/wise/codon.table";
++ matrix_file = "/usr/share/wise/BLOSUM62.bla";
+
+
+ }
+--- a/src/models/genewise.c
++++ b/src/models/genewise.c
+@@ -749,10 +749,10 @@ boolean build_objects(void)
+
+ void build_defaults(void)
+ {
+- gene_file = "human.gf";
+- new_gene_file = "gene.stat";
+- codon_file = "codon.table";
+- matrix_file = "BLOSUM62.bla";
++ gene_file = "/usr/share/wise/human.gf";
++ new_gene_file = "/usr/share/wise/gene.stat";
++ codon_file = "/usr/share/wise/codon.table";
++ matrix_file = "/usr/share/wise/BLOSUM62.bla";
+
+
+ }
+--- a/src/models/scanwisep.c
++++ b/src/models/scanwisep.c
+@@ -157,7 +157,7 @@ ScanWiseHSPImpl * new_ScanWiseHSPImpl_fr
+ out->use_multiscan = FALSE;
+ out->ior_file = NULL;
+ out->direct_sequence = NULL;
+- out->matrix_file = "BLOSUM62.bla";
++ out->matrix_file = "/usr/share/wise/BLOSUM62.bla";
+ out->step = 32;
+ out->host = "localhost";
+ out->port = 4050;
+@@ -546,7 +546,7 @@ int main(int argc,char ** argv)
+
+ /* ugly, but we don't want to bounce matrices around the network... */
+
+- mat = read_Blast_file_CompMat("BLOSUM62.bla");
++ mat = read_Blast_file_CompMat("/usr/share/wise/BLOSUM62.bla");
+
+ erroroff(REPORT);
+
+--- a/src/models/psw.c
++++ b/src/models/psw.c
+@@ -24,7 +24,7 @@ void show_help(FILE * ofp)
+ "\tOPTIONS\n"
+ "\t-g gap penalty (default 12)\n"
+ "\t-e ext penatly (default 2)\n"
+- "\t-m comp matrix (default BLOSUM62.bla)\n"
++ "\t-m comp matrix (default /usr/share/wise/BLOSUM62.bla)\n"
+ "\t-abc use the abc model\n"
+ "\t-a a penalty for above (default 120)\n"
+ "\t-b b penalty for above (default 10)\n"
+@@ -126,7 +126,7 @@ int main(int argc,char ** argv)
+
+ comp_file = strip_out_assigned_argument(&argc,argv,"m");
+ if( comp_file == NULL)
+- comp_file = "BLOSUM62.bla";
++ comp_file = "/usr/share/wise/BLOSUM62.bla";
+
+ if( (temp = strip_out_assigned_argument(&argc,argv,"dpenv")) != NULL ) {
+ dpenv = read_DPEnvelope_file(temp);
+--- a/src/test/basic_cdna.out
++++ b/src/test/basic_cdna.out
+@@ -3,13 +3,13 @@ This program is freely distributed under
+ Copyright (c) GRL limited: portions of the code are from separate copyrights
+
+ Query protein: roa1_drome
+-Comp Matrix: BLOSUM62.bla
++Comp Matrix: /usr/share/wise/BLOSUM62.bla
+ Gap open: 12
+ Gap extension: 2
+ Start/End default
+ Target Sequence HSHNCPA1
+ Strand: both
+-Codon Table: codon.table
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-05
+ Indel error: 1e-05
+ Algorithm 333
+--- a/src/test/basic_genomic.out
++++ b/src/test/basic_genomic.out
+@@ -3,17 +3,17 @@ This program is freely distributed under
+ Copyright (c) GRL limited: portions of the code are from separate copyright
+
+ Query protein: roa1_drome
+-Comp Matrix: BLOSUM62.bla
++Comp Matrix: /usr/share/wise/BLOSUM62.bla
+ Gap open: 12
+ Gap extension: 2
+ Start/End default
+ Target Sequence HSHNCPA1
+ Strand: forward
+ Start/End (protein) default
+-Gene Parameter file: gene.stat
++Gene Parameter file: /usr/share/wise/gene.stat
+ Splice site model: GT/AG only
+ GT/AG bits penalty -9.96
+-Codon Table: codon.table
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-06
+ Indel error: 1e-06
+ Null model syn
+--- a/src/test/pswdb.out
++++ b/src/test/pswdb.out
+@@ -12,7 +12,7 @@ Gap open: 12
+ Gap extension: 2
+ Query info from: road.pep
+ Database info from: pep.fa
+-Comp Matrix: BLOSUM62.bla
++Comp Matrix: /usr/share/wise/BLOSUM62.bla
+ [Warning: Can't fit histogram to a db smaller than 1,000]
+
+
+--- a/src/models/genestats.c
++++ b/src/models/genestats.c
+@@ -22,7 +22,7 @@ void show_help_GeneModelParam(FILE * ofp
+ fprintf(ofp," -splice_score_offset [%.1f] score offset for splice sites\n",DEFAULT_SPLICE_OFFSET_SCORE);
+ fprintf(ofp," -[no]splice_gtag make just gtag splice sites (default is gtag, ie no model)\n");
+ fprintf(ofp," -splice_gtag_prob [0.001] probability for gt/ag \n");
+- fprintf(ofp," -genestats [gene.stat]\n");
++ fprintf(ofp," -genestats [/usr/share/wise/gene.stat]\n");
+
+ }
+
+@@ -270,7 +270,7 @@ GeneModelParam * std_GeneModelParam(void
+ out->min_collar = -5.0;
+ out->max_collar = +5.0;
+ out->score_offset = DEFAULT_SPLICE_OFFSET_SCORE;
+- out->gene_stats_file = stringalloc("gene.stat");
++ out->gene_stats_file = stringalloc("/usr/share/wise/gene.stat");
+ out->use_gtag_splice = TRUE;
+
+ out->prob_for_gtag = 0.001;
+--- a/src/models/genestats.dy
++++ b/src/models/genestats.dy
+@@ -103,7 +103,7 @@ void show_help_GeneModelParam(FILE * ofp
+ fprintf(ofp," -splice_score_offset [%.1f] score offset for splice sites\n",DEFAULT_SPLICE_OFFSET_SCORE);
+ fprintf(ofp," -[no]splice_gtag make just gtag splice sites (default is gtag, ie no model)\n");
+ fprintf(ofp," -splice_gtag_prob [0.001] probability for gt/ag \n");
+- fprintf(ofp," -genestats [gene.stat]\n");
++ fprintf(ofp," -genestats [/usr/share/wise/gene.stat]\n");
+
+ }
+
+@@ -290,7 +290,7 @@ GeneModelParam * std_GeneModelParam(void
+ out->min_collar = -5.0;
+ out->max_collar = +5.0;
+ out->score_offset = DEFAULT_SPLICE_OFFSET_SCORE;
+- out->gene_stats_file = stringalloc("gene.stat");
++ out->gene_stats_file = stringalloc("/usr/share/wise/gene.stat");
+ out->use_gtag_splice = TRUE;
+
+ out->prob_for_gtag = 0.001;
+--- a/src/models/testgenestat.c
++++ b/src/models/testgenestat.c
+@@ -23,7 +23,7 @@ int main(int argc,char ** argv)
+
+ seq = read_fasta_file_Sequence("../../test_data/human.genomic");
+
+- ifp = openfile("gene.stat","r");
++ ifp = openfile("/usr/share/wise/gene.stat","r");
+
+ st = read_GeneStats(ifp);
+
+--- a/src/test/hmm_genomic.out
++++ b/src/test/hmm_genomic.out
+@@ -7,10 +7,10 @@ Start/End local
+ Target Sequence HSHNCPA1
+ Strand: forward
+ Start/End (protein) local
+-Gene Parameter file: gene.stat
++Gene Parameter file: /usr/share/wise/gene.stat
+ Splice site model: GT/AG only
+ GT/AG bits penalty -9.96
+-Codon Table: codon.table
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-06
+ Indel error: 1e-06
+ Null model syn
+--- a/src/test/hmm_cdna.out
++++ b/src/test/hmm_cdna.out
+@@ -6,7 +6,7 @@ Query model: unnamed
+ Start/End default
+ Target Sequence HSHNCPA1
+ Strand: both
+-Codon Table: codon.table
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-05
+ Indel error: 1e-05
+ Algorithm 333L
+--- a/src/test/genewise-db.out
++++ b/src/test/genewise-db.out
+@@ -12,8 +12,8 @@ Search mode: Single protein vs
+ Protein info from: rrm.HMM
+ Dna info from: dna.db
+ Start/End (protein) global
+-Gene Paras: human.gf
+-Codon Table: codon.table
++Gene Paras: /usr/share/wise/human.gf
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-05
+ Indel error: 1e-05
+ Model splice? model
+--- a/src/test/genewise-db-lite.out
++++ b/src/test/genewise-db-lite.out
+@@ -12,8 +12,8 @@ Search mode: Single protein vs
+ Protein info from: rrm.HMM
+ Dna info from: dna.db
+ Start/End (protein) global
+-Gene Paras: human.gf
+-Codon Table: codon.table
++Gene Paras: /usr/share/wise/human.gf
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-05
+ Indel error: 1e-05
+ Model splice? model
+--- a/src/test/estwise-db.out
++++ b/src/test/estwise-db.out
+@@ -13,7 +13,7 @@ Search mode: Single protein vs
+ Protein info from: rrm.HMM
+ Dna info from: dna.db
+ Start/End local
+-Codon Table: codon.table
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 0.01
+ Indel error: 0.01
+ Null model: synchronous
+--- a/src/test/genewisedb-pfam.out
++++ b/src/test/genewisedb-pfam.out
+@@ -12,8 +12,8 @@ Search mode: Single genomic vs
+ Protein info from: rrm.HMM
+ Dna info from: short.dna
+ Start/End (protein) default
+-Gene Paras: human.gf
+-Codon Table: codon.table
++Gene Paras: /usr/share/wise/human.gf
++Codon Table: /usr/share/wise/codon.table
+ Subs error: 1e-05
+ Indel error: 1e-05
+ Model splice? model
Modified: trunk/packages/wise/trunk/debian/patches/series
===================================================================
--- trunk/packages/wise/trunk/debian/patches/series 2014-08-04 20:27:16 UTC (rev 17613)
+++ trunk/packages/wise/trunk/debian/patches/series 2014-08-05 12:19:14 UTC (rev 17614)
@@ -7,3 +7,4 @@
07_ld--as-needed.patch
08_mayhem.patch
09_dnal-add-return-statement.patch
+10_fix_path_to_data_files.patch
Modified: trunk/packages/wise/trunk/debian/rules
===================================================================
--- trunk/packages/wise/trunk/debian/rules 2014-08-04 20:27:16 UTC (rev 17613)
+++ trunk/packages/wise/trunk/debian/rules 2014-08-05 12:19:14 UTC (rev 17614)
@@ -1,6 +1,9 @@
#!/usr/bin/make -f
# -*- makefile -*-
+pkg := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+pkg-data := $(pkg)-data
+
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
@@ -77,5 +80,9 @@
$(RM) -r docs/wise2
dh_clean
+override_dh_installexamples:
+ dh_installexamples
+ sed -i 's?"../bin/$$do"?"$$do"?' debian/$(pkg-data)/usr/share/doc/wise-data/examples/testman.pl
+
override_dh_auto_test:
make -C src test
Added: trunk/packages/wise/trunk/debian/tests/control
===================================================================
--- trunk/packages/wise/trunk/debian/tests/control (rev 0)
+++ trunk/packages/wise/trunk/debian/tests/control 2014-08-05 12:19:14 UTC (rev 17614)
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @, wise-data
+Restrictions: allow-stderr
Added: trunk/packages/wise/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/wise/trunk/debian/tests/run-unit-test (rev 0)
+++ trunk/packages/wise/trunk/debian/tests/run-unit-test 2014-08-05 12:19:14 UTC (rev 17614)
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+pkg=wise
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp /usr/share/doc/wise-data/examples/* $ADTTMP
+gunzip *.gz
+perl testman.pl < short.test
+# rm -f $ADTTMP/*
Added: trunk/packages/wise/trunk/debian/wise-data.examples
===================================================================
--- trunk/packages/wise/trunk/debian/wise-data.examples (rev 0)
+++ trunk/packages/wise/trunk/debian/wise-data.examples 2014-08-05 12:19:14 UTC (rev 17614)
@@ -0,0 +1 @@
+src/test/*
More information about the debian-med-commit
mailing list