[libocas] 01/04: Define an autopkgtest that runs the examples from the documentation

Christian Kastner chrisk-guest at moszumanska.debian.org
Mon Aug 25 17:00:44 UTC 2014


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

chrisk-guest pushed a commit to branch master
in repository libocas.

commit 92c288352bdcbda5563086d571fef4fbcaa4b2f8
Author: Christian Kastner <debian at kvr.at>
Date:   Mon Aug 25 08:54:27 2014 -0700

    Define an autopkgtest that runs the examples from the documentation
---
 debian/tests/control     |  2 ++
 debian/tests/executables | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..73572e0
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: executables
+Depends: libocas-tools
diff --git a/debian/tests/executables b/debian/tests/executables
new file mode 100644
index 0000000..ff2aebd
--- /dev/null
+++ b/debian/tests/executables
@@ -0,0 +1,15 @@
+#!/bin/sh
+# Run the examples from the man pages. Assumes $ADTTMP is set, see
+# /usr/share/doc/autopkgtest/README.package-tests.gz
+set -e
+
+# Copy the example data to $ADTTMP, and run the examples.
+cp data/* "$ADTTMP"
+cd "$ADTTMP"
+
+svmocas -c 10 -b 1 -v 0 riply_trn.light svmocas.model
+msvmocas -c 10 -v 0 example4_train.light msvmocas.model
+
+# linclassif exits with status == 1 on success...
+linclassif -e -o riply_tst.pred riply_tst.light svmocas.model || [ $? -eq 1 ]
+linclassif -e -o example4_test.pred example4_test.light msvmocas.model || [ $? -eq 1 ]

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



More information about the debian-science-commits mailing list