[Pkg-sdl-commits] [sdlgfx] 03/04: Add tests for autopkgtest
Manuel A. Fernandez Montecelo
mafm at moszumanska.debian.org
Tue Jun 27 16:49:36 UTC 2017
This is an automated email from the git hooks/post-receive script.
mafm pushed a commit to branch master
in repository sdlgfx.
commit 109a11c17a06874735845848eb7018103417314d
Author: Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
Date: Tue Jun 27 18:44:04 2017 +0200
Add tests for autopkgtest
---
debian/changelog | 1 +
debian/control | 1 +
debian/tests/compile-libsdl-gfx-test0 | 32 ++++++++++++++++++++++++++++++++
debian/tests/control | 3 +++
4 files changed, 37 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index d628b81..6a93b64 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ sdlgfx (2.0.25-7) UNRELEASED; urgency=medium
* Bump Policy Standards-Version to 4.0.0, no changes needed
* Fix for reproducible builds: specify permissions when creating
examples.tar file
+ * Add tests for autopkgtest
-- Manuel A. Fernandez Montecelo <mafm at debian.org> Tue, 27 Jun 2017 18:11:28 +0200
diff --git a/debian/control b/debian/control
index 1e3b44b..3b43b0c 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Build-Depends: debhelper (>= 10~),
Vcs-Browser: https://anonscm.debian.org/git/pkg-sdl/packages/sdlgfx.git
Vcs-Git: https://anonscm.debian.org/git/pkg-sdl/packages/sdlgfx.git
Homepage: http://www.ferzkopp.net/Software/SDL_gfx-2.0/
+Testsuite: autopkgtest
Package: libsdl-gfx1.2-5
diff --git a/debian/tests/compile-libsdl-gfx-test0 b/debian/tests/compile-libsdl-gfx-test0
new file mode 100644
index 0000000..c750c61
--- /dev/null
+++ b/debian/tests/compile-libsdl-gfx-test0
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# Author: Manuel A. Fernandez Montecelo <mafm at debian.org>
+#
+# autopkgtest check: Build example programs against the library, to perform a
+# basic smoke test
+
+
+set -e
+
+WORKDIR=$(mktemp -d)
+trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
+cd $WORKDIR
+
+EXAMPLES=/usr/share/doc/libsdl-gfx1.2-doc/examples.tar.gz
+
+# compile
+tar xvf $EXAMPLES -C .
+cd examples
+./autogen.sh
+./configure
+make
+echo "build: OK"
+
+# check/execute
+for executable in `echo *.cpp | sed 's|\.cpp||g'`
+do
+ [ -x $BINFILE ]
+ # interactive, cannot invoke and close from command line
+ #./$BINFILE
+done
+echo "run: OK"
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..6cafb63
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: compile-libsdl-gfx-test0
+Depends: libsdl-gfx1.2-dev, build-essential
+Restrictions: allow-stderr
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sdl/packages/sdlgfx.git
More information about the pkg-sdl-commits
mailing list