[med-svn] [libhat-trie] 01/02: add autopkgtest

Sascha Steinbiss satta at debian.org
Wed Jun 22 23:05:16 UTC 2016


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

satta pushed a commit to branch master
in repository libhat-trie.

commit 3356638df3d785dc4066b4b8aba28e6830105f8d
Author: Sascha Steinbiss <satta at debian.org>
Date:   Wed Jun 22 22:42:17 2016 +0000

    add autopkgtest
---
 debian/control         |  1 +
 debian/tests/build-lib | 27 +++++++++++++++++++++++++++
 debian/tests/control   |  2 ++
 3 files changed, 30 insertions(+)

diff --git a/debian/control b/debian/control
index 8715573..ebc6b3e 100644
--- a/debian/control
+++ b/debian/control
@@ -6,6 +6,7 @@ Uploaders: Sascha Steinbiss <satta at debian.org>
 Build-Depends: debhelper (>= 9),
                dh-autoreconf
 Standards-Version: 3.9.8
+Testsuite: autopkgtest
 Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libhat-trie.git
 Vcs-Git: https://anonscm.debian.org/git/debian-med/libhat-trie.git
 Homepage: https://github.com/dcjones/hat-trie
diff --git a/debian/tests/build-lib b/debian/tests/build-lib
new file mode 100755
index 0000000..7fa60f3
--- /dev/null
+++ b/debian/tests/build-lib
@@ -0,0 +1,27 @@
+#!/bin/sh
+# autopkgtest check: Build and run test tools against libhat-trie
+# Author: Sascha Steinbiss <satta at debian.org>
+set -e
+
+TSRC=$(pwd)/test
+SRC=$(pwd)/src
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+# copy sources
+cp -r $TSRC/* .
+cp $SRC/misc.* .
+
+# adjust include paths to system wide variant
+sed -i 's/..\/src/hat-trie/g' *.c
+sed -i 's/common.h/hat-trie\/common.h/g' *.h
+sed -i 's/misc.h/hat-trie\/misc.h/g' *.h
+
+# build and run tests
+gcc -o check_ahtable check_ahtable.c str_map.c -lhat-trie
+./check_ahtable
+gcc -o check_hattrie check_hattrie.c str_map.c -lhat-trie
+./check_hattrie
+gcc -o bench_sorted_iter bench_sorted_iter.c -lhat-trie
+./bench_sorted_iter
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..582a147
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: build-lib
+Depends: @, build-essential

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



More information about the debian-med-commit mailing list