[med-svn] [hmmer2] 01/01: Autopkgtests added

Canberk Koç cbk-guest at moszumanska.debian.org
Thu Jun 16 19:05:29 UTC 2016


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

cbk-guest pushed a commit to branch master
in repository hmmer2.

commit 92024413281e53c67dd7e6b6ec187213a9b1ac84
Author: cbk-guest <cbk-guests at scm.alioth.debian.org>
Date:   Thu Jun 16 22:05:05 2016 +0300

    Autopkgtests added
---
 debian/changelog           |  9 +++++++++
 debian/rules               | 12 ++++++++++++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 23 +++++++++++++++++++++++
 4 files changed, 47 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d3aa0c5..b7767dc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+hmmer2 (2.3.2-11) UNRELEASED; urgency=medium
+
+  * Team upload.
+  * autopkgtests added
+  * debian/rules:
+    - added example files
+
+ -- Canberk Koç <canberkkoc at gmail.com>  Thu, 16 Jun 2016 22:01:44 +0300
+
 hmmer2 (2.3.2-10) UNRELEASED; urgency=medium
 
   * Set VCS URLs to point to git repository
diff --git a/debian/rules b/debian/rules
index 0134e1a..9447248 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@ export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
 export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
 export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 
+pkgdata:=hmmer2
+sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples
+
 # lkajan: The following violates point 4.9 of the Debian policy: "get-orig-source [...] may be invoked in any directory [...]" as uscan needs to find the watch file.
 .PHONY: get-orig-source
 get-orig-source:
@@ -42,3 +45,12 @@ override_dh_installchangelogs:
 
 %:
 	dh $@ --parallel --with autotools-dev
+
+override_dh_installexamples:
+	dh_installexamples
+	mkdir -p $(sampledir);
+	sed -i "s#hmm#hmm2#g" testsuite/exercises.sqc
+	cp -a testsuite/* $(sampledir)/;
+	mkdir $(sampledir)/tutorial;
+	cp -a tutorial/* $(sampledir)/tutorial;
+	sed -i "s#../tut#./tut#g" $(sampledir)/exercises.sqc
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..b8a7cf3
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions:
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..525f75c
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+pkg="hmmer2"
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+  AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* $AUTOPKGTEST_TMP
+
+cd $AUTOPKGTEST_TMP
+
+find . -name "*.gz" -exec gunzip \{\} \;
+
+testnames=`cut -f2 -d '@' ./exercises.sqc | grep "_test\|_exercise"`
+
+chmod +x $testnames
+chmod +x ./sqc
+
+./sqc 2 exercises.sqc . /usr/bin
+
+echo "PASS"

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



More information about the debian-med-commit mailing list