[med-svn] [exonerate] 01/01: Added debian tests

Canberk Koç cbk-guest at moszumanska.debian.org
Thu Apr 7 01:31:13 UTC 2016


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

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

commit 8f13ea7085e37e75e0eb5872da870efd5ccd195b
Author: Canberk Koç <canberkkoc at gmail.com>
Date:   Thu Apr 7 04:26:38 2016 +0300

    Added debian tests
---
 debian/changelog           |  7 +++++++
 debian/rules               | 15 +++++++++++++++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 20 ++++++++++++++++++++
 4 files changed, 45 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2ac6575..42a56f5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+exonerate (2.4.0-1.1) UNRELEASED; urgency=medium
+
+  * debian/tests: added testsuite
+  * debian/rules: changes for testing
+
+ -- Canberk Koç <canberkkoc at gmail.com>  Thu, 07 Apr 2016 04:24:08 +0300
+
 exonerate (2.4.0-1) unstable; urgency=medium
 
   * New upstream version
diff --git a/debian/rules b/debian/rules
index 5d19bcc..5c07c19 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,9 @@
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
+pkgdata:=exonerate
+sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples
+
 %:
 	dh $@ --with autoreconf
 
@@ -21,3 +24,15 @@ override_dh_auto_test:
 
 override_dh_installchangelogs:
 	dh_installchangelogs -k ChangeLog
+
+override_dh_installexamples:
+	dh_installexamples
+	mkdir -p $(sampledir);
+	cp -a test/* $(sampledir)/;
+	find $(sampledir) \( -name "Makefile*" -o -name "*.log" -o -name "*.trs" \) -exec rm \{\} \;
+	for testfile in `find $(sampledir) -name "*.sh"` ; do \
+		sed -i -e "s#../../src/util/#/usr/bin/#" \
+			   -e "s#../../src/program/#/usr/bin/#" \
+			   -e "s#../data/#./data/#" \
+			$${testfile} ; \
+	done
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..9a6c08b
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+
+pkg="exonerate"
+
+if [ "$ADTTMP" = "" ] ; then
+  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
+fi
+
+cp -a /usr/share/doc/${pkg}/examples/* $ADTTMP
+
+cd $ADTTMP
+
+for testname in `find "$(pwd)" -name "*.sh"` ; do
+	echo ; \
+	echo $testname ; \
+	$testname ; \
+done
+
+echo "PASS"

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



More information about the debian-med-commit mailing list