[liboggz] 01/04: Added simple autopkgtest script to verify oggz-info is working.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu May 26 11:37:53 UTC 2016


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

pere pushed a commit to branch master
in repository liboggz.

commit 8f165633cf12142c74a5a0a5b4d78748b52d73e5
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu May 26 10:06:35 2016 +0200

    Added simple autopkgtest script to verify oggz-info is working.
---
 debian/rules                |  7 +++++++
 debian/tests/control        |  3 +++
 debian/tests/test-oggz-info | 41 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+)

diff --git a/debian/rules b/debian/rules
index 9010867..772d8cb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,3 +5,10 @@
 
 override_dh_strip:
 	dh_strip --dbg-package=liboggz2-dbg
+
+# Run our test suite until the upstream source get one
+override_dh_auto_test:
+	dh_auto_test
+	for t in debian/tests/test-*; do \
+	    BUILDDIR=`pwd` $$t; \
+	done
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..d189ea9
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: test-oggz-info
+Depends: @, vorbis-tools, valgrind
+Restrictions: allow-stderr
diff --git a/debian/tests/test-oggz-info b/debian/tests/test-oggz-info
new file mode 100755
index 0000000..df8d00d
--- /dev/null
+++ b/debian/tests/test-oggz-info
@@ -0,0 +1,41 @@
+#!/bin/sh
+#
+# make sure oggz-info can extract information
+
+RETVAL=0
+
+set -e
+set -x
+
+at_exit() {
+    set +x
+    echo "info: test exiting, removing $WORKDIR"
+    rm -rf $WORKDIR
+}
+WORKDIR=$(mktemp -d)
+trap at_exit INT TERM EXIT
+set -x
+
+cd $WORKDIR
+
+if type valgrind >/dev/null 2>&1 ; then
+    VALGRIND=valgrind
+fi
+
+OGGZINFO=oggz-info
+if [ -x ${BUILDDIR}/src/tools/oggz-info ] ; then
+    OGGZINFO=${BUILDDIR}/src/tools/oggz-info
+fi
+
+head -c 500000 /dev/zero | oggenc -Q -r -o 1.ogg -
+
+if $VALGRIND $OGGZINFO 1.ogg ; then
+    echo "success: oggzinfo worked"
+else
+    echo "error: oggzinfo didn't work."
+    RETVAL=1
+fi
+
+rm -f 1.ogg
+
+exit $RETVAL

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



More information about the pkg-xiph-commits mailing list