[pyevolve] 74/81: Define an autopkgtest that runs most examples
Christian Kastner
chrisk-guest at moszumanska.debian.org
Sun Aug 17 21:12:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
chrisk-guest pushed a commit to branch master
in repository pyevolve.
commit c10734c26a695f9fc9436833d4b334e9c8ef81c1
Author: Christian Kastner <debian at kvr.at>
Date: Thu Aug 7 21:09:21 2014 +0200
Define an autopkgtest that runs most examples
---
debian/tests/control | 2 ++
debian/tests/run-most-examples | 32 ++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..1c9e9c6
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: run-most-examples
+Depends: python-pyevolve
diff --git a/debian/tests/run-most-examples b/debian/tests/run-most-examples
new file mode 100644
index 0000000..0f9cccb
--- /dev/null
+++ b/debian/tests/run-most-examples
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Run python-pyevolve examples using the default Python version. Assumes
+# $ADTTMP is set, see /usr/share/doc/autopkgtest/README.package-tests.rst.gz
+#
+# The following tests are skipped:
+# #12: skipped because it takes ages to run
+# #21: skipped because it needs python-visual
+set -e
+
+# Copy the examples to the $ADTTMP directory and run the tests from there.
+cp -r examples/*.py "$ADTTMP"
+cd "$ADTTMP"
+
+for example in *.py
+do
+ echo "\n\n"
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+ echo "$example"
+ echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
+
+ if [ "$example" = "pyevolve_ex12_tsp.py" ]
+ then
+ echo "Skipping test $example, takes too long"
+ continue
+ elif [ "$example" = "pyevolve_ex21_nqueens.py" ]
+ then
+ echo "Skipping test $example, requires python-visual"
+ continue
+ fi
+
+ python $example
+done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyevolve.git
More information about the debian-science-commits
mailing list