[med-svn] [ffindex] 01/01: Autopkgtest suite added with allocation error

Canberk Koç cbk-guest at moszumanska.debian.org
Fri Jun 24 04:43:45 UTC 2016


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

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

commit c0ff301e87748c33498ea83bed5eb8697352c4da
Author: cbk-guest <cbk-guests at scm.alioth.debian.org>
Date:   Fri Jun 24 07:43:30 2016 +0300

    Autopkgtest suite added with allocation error
---
 debian/changelog           |  8 ++++++++
 debian/rules               | 10 ++++++++++
 debian/tests/control       |  3 +++
 debian/tests/run-unit-test | 29 +++++++++++++++++++++++++++++
 4 files changed, 50 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 90f15a5..39fc0e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+ffindex (0.9.9.7-2) UNRELEASED; urgency=medium
+
+  * Team upload.
+  [Canberk Koç]
+  *Autopkgtest suite added. 
+
+ -- Canberk Koç <canberkkoc at gmail.com>  Fri, 24 Jun 2016 07:40:53 +0300
+
 ffindex (0.9.9.7-1) unstable; urgency=medium
 
   * New upstream version
diff --git a/debian/rules b/debian/rules
index a14423c..83e6f5e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,6 +6,10 @@
 # lkajan: work in progress, enable this in next upstream release, after speaking to upstream
 # tille at d.o: If enabled only ffindex_apply_mpi and for creating the manpage another (not yet
 #            known) Build-Depends is needed.
+
+pkgdata:=ffindex
+sampledir:=$(CURDIR)/debian/$(pkgdata)/usr/share/doc/$(pkgdata)/examples
+
 export HAVE_MPI:=1
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
@@ -46,3 +50,9 @@ override_dh_auto_test:
 get-orig-source:
 	mkdir -p ../tarballs
 	uscan --verbose --force-download --destdir=../tarballs
+
+override_dh_installexamples:
+	dh_installexamples
+	cp -aR test $(sampledir)/;
+	cp ./src/test.should $(sampledir)/;
+	cp ./src/test-unlink.should $(sampledir)/;
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..68dc8ea
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,29 @@
+#!/bin/bash
+set -e
+
+pkg="ffindex"
+
+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
+
+FFINDEX_MAX_INDEX_ENTRIES=20000 
+
+rm -f ./test.data ./test.ffindex
+ffindex_build  ./test.data ./test.ffindex ./data ./data2
+ffindex_get  ./test.data ./test.ffindex a b foo | tee ./test.out
+ffindex_modify -u ./test.ffindex b
+ffindex_get  ./test.data ./test.ffindex a b foo | tee ./test-unlink.out
+ffindex_build  ./test.data  ./test.ffindex ./testfile
+
+echo ======== compare results =========
+
+diff ./test.out ./test.should
+diff ./test-unlink.out ./test-unlink.should
+
+
+echo "PASS"

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



More information about the debian-med-commit mailing list