[simage] 02/04: Add autopkgtest.

Anton Gladky gladk at moszumanska.debian.org
Sun Sep 4 17:25:10 UTC 2016


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

gladk pushed a commit to branch master
in repository simage.

commit 7aee1b8bfceb929e423c5ffb93cf8adb540a8adf
Author: Anton Gladky <gladk at debian.org>
Date:   Sun Sep 4 19:19:18 2016 +0200

    Add autopkgtest.
---
 debian/control        |   1 +
 debian/tests/a_in.png | Bin 0 -> 20110 bytes
 debian/tests/check1   |  20 ++++++++++++++++++++
 debian/tests/check2   |  20 ++++++++++++++++++++
 debian/tests/control  |   2 ++
 5 files changed, 43 insertions(+)

diff --git a/debian/control b/debian/control
index e9015a5..7b54f63 100644
--- a/debian/control
+++ b/debian/control
@@ -3,6 +3,7 @@ Maintainer: Debian Science Team <debian-science-maintainers at lists.alioth.debian.
 Uploaders: Steve M. Robbins <smr at debian.org>,
            Anton Gladky <gladk at debian.org>
 Section: graphics
+Testsuite: autopkgtest
 Priority: optional
 Build-Depends: autotools-dev,
                debhelper (>= 9),
diff --git a/debian/tests/a_in.png b/debian/tests/a_in.png
new file mode 100644
index 0000000..3573ed5
Binary files /dev/null and b/debian/tests/a_in.png differ
diff --git a/debian/tests/check1 b/debian/tests/check1
new file mode 100755
index 0000000..68d872a
--- /dev/null
+++ b/debian/tests/check1
@@ -0,0 +1,20 @@
+#!/bin/sh
+# autopkgtest check for simage
+# (C) 2016 Anton Gladky <gladk at debian.org>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cp debian/tests/a_in.png $WORKDIR/ 
+cp examples/simage-read-line-test.c $WORKDIR/ 
+
+cd $WORKDIR
+
+gcc simage-read-line-test.c -lsimage -o simage-read-line-test
+echo "build: OK"
+
+./simage-read-line-test a_in.png a_out.png
+ls -ln
+
+echo "run: OK"
diff --git a/debian/tests/check2 b/debian/tests/check2
new file mode 100755
index 0000000..9c27c0e
--- /dev/null
+++ b/debian/tests/check2
@@ -0,0 +1,20 @@
+#!/bin/sh
+# autopkgtest check for simage
+# (C) 2016 Anton Gladky <gladk at debian.org>
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cp debian/tests/a_in.png $WORKDIR/ 
+cp examples/simage-convert.c $WORKDIR/ 
+
+cd $WORKDIR
+
+gcc simage-convert.c -lsimage -o simage-convert
+echo "build: OK"
+
+./simage-convert a_in.png a_out.png
+ls -ln
+
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..258e1af
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: check1 check2
+Depends: libsimage-dev, build-essential

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



More information about the debian-science-commits mailing list