[limereg] 06/33: Added autopkgtest scripts

Mattia Rizzolo mattia at debian.org
Wed May 3 16:39:34 UTC 2017


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

mattia pushed a commit to branch master
in repository limereg.

commit 1b371f9ddc673d9d12b5052441b93dba73e8a2ac
Author: Roelof <roelof at debian.fritz.box>
Date:   Sat May 30 09:35:14 2015 +0200

    Added autopkgtest scripts
---
 debian/control              |  1 +
 debian/tests/control        |  2 ++
 debian/tests/limeregtestapi | 21 +++++++++++++++++++++
 debian/tests/limeregtestexe | 20 ++++++++++++++++++++
 4 files changed, 44 insertions(+)

diff --git a/debian/control b/debian/control
index 6521d7e..bad1faa 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Standards-Version: 3.9.6
 Homepage: http://embedded-software-architecture.com/limereg.html
 Vcs-Git: git://anonscm.debian.org/debian-science/packages/limereg.git
 Vcs-Browser: http://anonscm.debian.org/gitweb/?p=debian-science/packages/limereg.git
+XS-Testsuite: autopkgtest
 
 Package: limereg
 Section: science
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..34349c5
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: limeregtestapi limeregtestexe
+Depends: @ build-essential
diff --git a/debian/tests/limeregtestapi b/debian/tests/limeregtestapi
new file mode 100755
index 0000000..e1e7b08
--- /dev/null
+++ b/debian/tests/limeregtestapi
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > limeregtestapi.c
+#include <string.h>
+#include <limereg.h>
+int main(void)
+{
+	return strcmp(Limereg_GetVersion(), "1.4.0");
+}
+EOF
+
+gcc -o limeregtestapi limeregtestapi.c `pkg-config --cflags --libs liblimereg`
+echo "build: OK"
+[ -x limeregtestapi ]
+./limeregtestapi
+echo "run: OK"
diff --git a/debian/tests/limeregtestexe b/debian/tests/limeregtestexe
new file mode 100755
index 0000000..b82b1af
--- /dev/null
+++ b/debian/tests/limeregtestexe
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+cat <<EOF > limeregtestexe.c
+#include <stdlib.h>
+int main(void)
+{
+	return system("limereg --help | tee /dev/tty | grep 'limereg 1.4.0'");
+}
+EOF
+
+gcc -o limeregtestexe limeregtestexe.c
+echo "build: OK"
+[ -x limeregtestexe ]
+./limeregtestexe
+echo "run: OK"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/limereg.git



More information about the debian-science-commits mailing list