[med-svn] [Git][med-team/mmseqs2][master] Fix test_bestalphabet binary. Now works.

Shayan Doust gitlab at salsa.debian.org
Sun Jul 21 13:41:46 BST 2019



Shayan Doust pushed to branch master at Debian Med / mmseqs2


Commits:
968f4d6e by Shayan Doust at 2019-07-20T17:09:47Z
Fix test_bestalphabet binary. Now works.
This is used within autopkgtest

- - - - -


2 changed files:

- debian/patches/fix_tests.patch
- debian/tests/run-unit-test


Changes:

=====================================
debian/patches/fix_tests.patch
=====================================
@@ -6,8 +6,8 @@ Last-Update: 2019-07-20
 
 Index: mmseqs2/src/test/TestScoreMatrixSerialization.cpp
 ===================================================================
---- mmseqs2.orig/src/test/TestScoreMatrixSerialization.cpp	2019-07-20 16:32:20.107321242 +0100
-+++ mmseqs2/src/test/TestScoreMatrixSerialization.cpp	2019-07-20 16:32:58.363643912 +0100
+--- mmseqs2.orig/src/test/TestScoreMatrixSerialization.cpp	2019-07-20 17:51:23.891331720 +0100
++++ mmseqs2/src/test/TestScoreMatrixSerialization.cpp	2019-07-20 17:51:23.879331619 +0100
 @@ -18,10 +18,12 @@
      ScoreMatrix* unserialized = ScoreMatrix::unserialize(serialized, subMat.alphabetSize, 3);
  
@@ -25,3 +25,27 @@ Index: mmseqs2/src/test/TestScoreMatrixSerialization.cpp
 +   
      return EXIT_SUCCESS;
  }
+Index: mmseqs2/src/test/TestBestAlphabet.cpp
+===================================================================
+--- mmseqs2.orig/src/test/TestBestAlphabet.cpp	2019-07-20 08:12:45.250499276 +0100
++++ mmseqs2/src/test/TestBestAlphabet.cpp	2019-07-20 17:52:58.384128682 +0100
+@@ -58,7 +58,7 @@
+     /////////                                 |   ////////////////
+     ///////// Choose substitution matrix here V ! ////////////////
+     //SubstitutionMatrix subMat("/Users/soeding/Projects/MMseqs2/MMseqs2/data/blosum100.out", 2.0, -0.0f);
+-    SubstitutionMatrix subMat("/Users/soeding/Projects/MMseqs2/MMseqs2/data/PAM70.out", 2.0, -0.0f);
++    SubstitutionMatrix subMat("../example-data/PAM70.out", 2.0, -0.0f);
+ 
+     const size_t numAAs = subMat.alphabetSize-1;    // size of original alphabet
+     const size_t numKmers = pow(numAAs,kmerSize);
+@@ -72,8 +72,8 @@
+     //////////////////////////////////////////////////////////////////////////////////////////////
+     // Compute probabilities for all 20^k k-mers in a sequence database "seqDB"
+ 
+-    std::string dbPath = "seqDB";
+-    std::string dbIndexPath = "seqDB.index";
++    std::string dbPath = "../example-data/DB";
++    std::string dbIndexPath = "../example-data/DB.index";
+     DBReader<unsigned int> seqDb(dbPath.c_str(), dbIndexPath.c_str(), 1, DBReader<unsigned int>::USE_DATA|DBReader<unsigned int>::USE_INDEX);
+     seqDb.open(DBReader<unsigned int>::NOSORT);
+ 


=====================================
debian/tests/run-unit-test
=====================================
@@ -9,6 +9,14 @@ if [ "${AUTOPKGTEST_TMP}" = "" ] ; then
 fi
 
 cp -r /usr/lib/${pkg}/test "${AUTOPKGTEST_TMP}"
+cp -r /usr/share/doc/${pkg}/example-data "${AUTOPKGTEST_TMP}"
+
+# Build some data for the test binaries as prerequisites
+cd "${AUTOPKGTEST_TMP}"/example-data
+gunzip *.gz
+
+mmseqs createdb DB.fasta DB
+mmseqs createindex DB tmp
 
 cd "${AUTOPKGTEST_TMP}"/test
 
@@ -57,3 +65,5 @@ echo "Invoking test_util"
 ./test_util
 echo "Invoking test_scorematrixserialization"
 ./test_scorematrixserialization
+echo "Invoking test_bestalphabet"
+./test_bestalphabet



View it on GitLab: https://salsa.debian.org/med-team/mmseqs2/commit/968f4d6ec81844e7d448281bfed3a52b3b01fba1

-- 
View it on GitLab: https://salsa.debian.org/med-team/mmseqs2/commit/968f4d6ec81844e7d448281bfed3a52b3b01fba1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20190721/545f9b65/attachment-0001.html>


More information about the debian-med-commit mailing list