[libvorbis] 01/02: Added simple autopkgtest script running the examples.

Petter Reinholdtsen pere at moszumanska.debian.org
Sat Feb 6 13:23:19 UTC 2016


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

pere pushed a commit to branch master
in repository libvorbis.

commit 3927f409d45b1e0ed0f4a736786c01393baacafb
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat Feb 6 13:16:06 2016 +0000

    Added simple autopkgtest script running the examples.
---
 debian/control             |  1 +
 debian/tests/control       |  2 ++
 debian/tests/test-examples | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+)

diff --git a/debian/control b/debian/control
index 7fd55eb..0f4c617 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,7 @@ Uploaders:
  , Petter Reinholdtsen <pere at debian.org>
 Build-Depends: debhelper (>= 9~), dh-autoreconf, libogg-dev
 Standards-Version: 3.9.6
+Testsuite: autopkgtest
 Vcs-Git: https://anonscm.debian.org/git/pkg-xiph/libvorbis.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-xiph/libvorbis.git
 Homepage: http://www.xiph.org/vorbis/
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..a056d7d
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Depends: @, pysycache-i18n
+Tests: test-examples
diff --git a/debian/tests/test-examples b/debian/tests/test-examples
new file mode 100755
index 0000000..944d23d
--- /dev/null
+++ b/debian/tests/test-examples
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# Try to build and run the example code.  Provide input on both stdin
+# and as first argument as the programs seem to handle either or both.
+# The goal is to verify that it is possible to link with the libvorbis
+# library and run the resulting binaries.
+
+set -e
+
+CC=gcc
+
+retval=0
+cd $ADTTMP
+
+# Some small ogg file, picked randomly from pysycache-i18n
+cp /usr/share/games/pysycache/lang/en_EN/menu9.ogg testinput.ogg
+
+for f in /usr/share/doc/libvorbis-dev/examples/*.c.gz; do
+    echo "****** Testing $f ******"
+    cp $f .
+    gunzip $(basename $f)
+    ${CC} -o example $(basename $f .gz) \
+	-logg -lvorbisenc -lvorbisfile -lvorbis -lm
+
+    if cat testinput.ogg | ./example testinput.ogg > testoutput ; then
+	echo "success running $f"
+    else
+	echo "error running $f"
+	retval=1
+    fi
+done
+exit $retval

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xiph/libvorbis.git



More information about the pkg-xiph-commits mailing list