[libfann] 129/133: Add autopkgtest for successful build & run of python-pyfann

Christian Kastner chrisk-guest at moszumanska.debian.org
Sat Oct 4 21:07:56 UTC 2014


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

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

commit 0e65881f992fdf334b7f48572da0a3928b9f33a0
Author: Christian Kastner <debian at kvr.at>
Date:   Wed Apr 23 23:46:54 2014 +0200

    Add autopkgtest for successful build & run of python-pyfann
---
 debian/tests/control      |  5 ++++-
 debian/tests/python-build | 22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/debian/tests/control b/debian/tests/control
index 01faa51..45a9a51 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,5 @@
 Tests: build
-Depends: libfann-dev, build-essential
\ No newline at end of file
+Depends: libfann-dev, build-essential
+
+Tests: python-build
+Depends: python-pyfann
diff --git a/debian/tests/python-build b/debian/tests/python-build
new file mode 100644
index 0000000..e8d81b2
--- /dev/null
+++ b/debian/tests/python-build
@@ -0,0 +1,22 @@
+#!/bin/sh
+# autopkgtest check: Python module successfully imported and executed
+set -e
+
+# Presence of $ADTTMP implies that someone will handle cleanup for us
+if [ -z "$ADTTMP" ]
+then
+	echo "Required envvar \"$ADTTMP\"is not set" >&2
+	exit 1
+fi
+
+# Copy the simple example and the training data to $ADTTMP, and execute it
+cp python/examples/simple_train.py "$ADTTMP"
+cp examples/xor.data "$ADTTMP"
+cd "$ADTTMP"
+
+# Fix input (training data) and output paths in the example
+sed -i -r -e 's|\.\./\.\./examples/||' simple_train.py
+sed -i -r -e 's|nets/||' simple_train.py
+
+python simple_train.py
+echo "run: OK"

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



More information about the debian-science-commits mailing list