[Pkg-sdl-commits] [libsdl-sge] 03/04: Add tests for autopkgtest

Manuel A. Fernandez Montecelo mafm at moszumanska.debian.org
Mon Aug 24 15:42:34 UTC 2015


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

mafm pushed a commit to branch master
in repository libsdl-sge.

commit 01785636c702b1251fdd16266f19f8f699565e0e
Author: Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
Date:   Mon Aug 24 16:30:55 2015 +0100

    Add tests for autopkgtest
---
 debian/changelog                      |  1 +
 debian/control                        |  1 +
 debian/tests/compile-libsdl-sge-test0 | 30 ++++++++++++++++++++++++++++++
 debian/tests/control                  |  2 ++
 4 files changed, 34 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b7948b2..235d01d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ libsdl-sge (030809dfsg-6) UNRELEASED; urgency=medium
     GCC-5/C++11 ABI change transition (that version was not the default on
     all arches at the time)
   * Update URL in Vcs-Browser
+  * Add tests for autopkgtest
 
  -- Manuel A. Fernandez Montecelo <mafm at debian.org>  Mon, 24 Aug 2015 16:03:34 +0100
 
diff --git a/debian/control b/debian/control
index f929fb7..e152742 100644
--- a/debian/control
+++ b/debian/control
@@ -11,6 +11,7 @@ Standards-Version: 3.9.6
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-sdl/packages/libsdl-sge.git
 Vcs-Git: git://anonscm.debian.org/pkg-sdl/packages/libsdl-sge.git
 Homepage: http://www.digitalfanatics.org/cal/sge/
+Testsuite: autopkgtest
 
 Package: libsdl-sge
 Architecture: any
diff --git a/debian/tests/compile-libsdl-sge-test0 b/debian/tests/compile-libsdl-sge-test0
new file mode 100644
index 0000000..0fa3abe
--- /dev/null
+++ b/debian/tests/compile-libsdl-sge-test0
@@ -0,0 +1,30 @@
+#!/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
+
+EXAMPLESDIR=/usr/share/doc/libsdl-sge-dev/examples
+
+# compile
+cp -v $EXAMPLESDIR/* .
+make clean
+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..feef1cf
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: compile-libsdl-sge-test0
+Depends: libsdl-sge-dev, build-essential

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sdl/packages/libsdl-sge.git



More information about the pkg-sdl-commits mailing list