[med-svn] r22207 - in trunk/packages/rostlab/librostlab/trunk/debian: . examples tests

Tatiana Malygina latticetower-guest at moszumanska.debian.org
Sun Jun 26 06:11:24 UTC 2016


Author: latticetower-guest
Date: 2016-06-26 06:11:24 +0000 (Sun, 26 Jun 2016)
New Revision: 22207

Added:
   trunk/packages/rostlab/librostlab/trunk/debian/examples/
   trunk/packages/rostlab/librostlab/trunk/debian/examples/blosum62_test.cpp
   trunk/packages/rostlab/librostlab/trunk/debian/tests/
   trunk/packages/rostlab/librostlab/trunk/debian/tests/control
   trunk/packages/rostlab/librostlab/trunk/debian/tests/installation-test
Modified:
   trunk/packages/rostlab/librostlab/trunk/debian/changelog
Log:
add simple testsuite

Modified: trunk/packages/rostlab/librostlab/trunk/debian/changelog
===================================================================
--- trunk/packages/rostlab/librostlab/trunk/debian/changelog	2016-06-26 06:07:30 UTC (rev 22206)
+++ trunk/packages/rostlab/librostlab/trunk/debian/changelog	2016-06-26 06:11:24 UTC (rev 22207)
@@ -2,6 +2,7 @@
 
   * Team upload.
   * add hardening
+  * add simplest test
 
  -- Tatiana Malygina <merlettaia at gmail.com>  Sun, 26 Jun 2016 09:06:16 +0300
 

Added: trunk/packages/rostlab/librostlab/trunk/debian/examples/blosum62_test.cpp
===================================================================
--- trunk/packages/rostlab/librostlab/trunk/debian/examples/blosum62_test.cpp	                        (rev 0)
+++ trunk/packages/rostlab/librostlab/trunk/debian/examples/blosum62_test.cpp	2016-06-26 06:11:24 UTC (rev 22207)
@@ -0,0 +1,21 @@
+// Simple example file for autopkgtest: 
+// loads blosum62 matrix from librostlab and prints it.
+// Author: Tatiana Malygina <merlettaia at gmail.com>
+
+#include <iostream>
+#include <rostlab/blosum62.h>
+
+using namespace rostlab;
+
+int main() {
+  for (int i = 0; i < 27; i++) {
+    for (int j = 0; j < 27; j++) {
+      std::cout << int(rostlab::blosum62[i][j]) << " ";
+    }
+    std::cout << std::endl;
+  }
+  return 0;
+}
+
+// Compile with:
+// g++ -Wall -lrostlab blosum62_test.cpp -o blosum62_test 

Added: trunk/packages/rostlab/librostlab/trunk/debian/tests/control
===================================================================
--- trunk/packages/rostlab/librostlab/trunk/debian/tests/control	                        (rev 0)
+++ trunk/packages/rostlab/librostlab/trunk/debian/tests/control	2016-06-26 06:11:24 UTC (rev 22207)
@@ -0,0 +1,2 @@
+Tests: installation-test
+Depends: @

Added: trunk/packages/rostlab/librostlab/trunk/debian/tests/installation-test
===================================================================
--- trunk/packages/rostlab/librostlab/trunk/debian/tests/installation-test	                        (rev 0)
+++ trunk/packages/rostlab/librostlab/trunk/debian/tests/installation-test	2016-06-26 06:11:24 UTC (rev 22207)
@@ -0,0 +1,27 @@
+#!/bin/sh
+# autopkgtest check: build and run with simple test data
+# Author: Tatiana Malygina <merlettaia at gmail.com>
+
+set -e
+
+pkg=librostlab3-dev
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+  trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd $ADTTMP
+
+cp -a /usr/share/doc/${pkg}/examples/* .
+find . -type f -name "*.gz" -exec gunzip \{\} \;
+for lnk in `find . -type l -name "*.gz"` ; do
+    ln -s `basename $(readlink $lnk) .gz` `echo $lnk | sed 's/\.gz$//'`
+    rm $lnk
+done
+
+echo "Compile and run..."
+g++ -Wall -lrostlab blosum62_test.cpp -o blosum62_test
+[ -s blosum62_test ]
+[ -x blosum62_test ]
+./blosum62_test




More information about the debian-med-commit mailing list