[med-svn] [plast] 01/02: Add unit tests

Andreas Tille tille at debian.org
Tue Feb 9 18:22:52 UTC 2016


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

tille pushed a commit to branch master
in repository plast.

commit bb9903cfc2cf6aca9a0172aa55c12a0e9e38dc78
Author: Andreas Tille <tille at debian.org>
Date:   Tue Feb 9 18:51:51 2016 +0100

    Add unit tests
---
 debian/README.test            | 11 +++++++++++
 debian/plast-example.examples |  1 -
 debian/plast-example.install  |  2 ++
 debian/plast.docs             |  2 ++
 debian/tests/control          |  3 +++
 debian/tests/run-unit-test    | 45 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 63 insertions(+), 1 deletion(-)

diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..be6bc6a
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,11 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+To run the unit tests provided by upstream you can install
+the package plast-example and run
+
+   sh example/run-unit-test
+
+which will bei installed in this directory.
+
+
diff --git a/debian/plast-example.examples b/debian/plast-example.examples
deleted file mode 100644
index 65eef93..0000000
--- a/debian/plast-example.examples
+++ /dev/null
@@ -1 +0,0 @@
-db
diff --git a/debian/plast-example.install b/debian/plast-example.install
new file mode 100644
index 0000000..87def61
--- /dev/null
+++ b/debian/plast-example.install
@@ -0,0 +1,2 @@
+db				usr/share/doc/plast/example
+debian/tests/run-unit-test 	usr/share/doc/plast/example
diff --git a/debian/plast.docs b/debian/plast.docs
new file mode 100644
index 0000000..df6384d
--- /dev/null
+++ b/debian/plast.docs
@@ -0,0 +1,2 @@
+debian/README.test
+README
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d2aa55a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..930577b
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+
+pkg=plast
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/${pkg}/example/db .
+find . -type f -name "*.gz" -exec gunzip \{\} \;
+
+
+#/*****************************************************************************
+# *                                                                           *
+# *   PLAST : Parallel Local Alignment Search Tool                            *
+# *   Copyright (c) 2009-2015 Inria                                           *
+# *                                                                           *
+# *   PLAST is free software; you can redistribute it and/or modify it under  *
+# *   the Affero GPL v3 License                                               *
+# *                                                                           *
+# *   This program is distributed in the hope that it will be useful,         *
+# *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
+# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            *
+# *   CECILL version 2 License for more details.                              *
+# *****************************************************************************/
+
+# We get the directory of the script (absolute path)
+_result=db/out.txt
+
+echo "Start PLAST..."
+echo
+
+# We setup a PLAST command-line and run it to test the software
+_cmdline="/usr/bin/plast -p plastp -i db/query.fa -d db/tursiops.fa -o $_result"
+
+echo $_cmdline
+
+eval $_cmdline
+
+echo
+echo " done!"
+echo
+echo "Read:" $_result
+echo
+echo
+

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



More information about the debian-med-commit mailing list