[pykdtree] 01/02: Enable automatic testing
Antonio Valentino
a_valentino-guest at moszumanska.debian.org
Sun Jun 22 12:43:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
a_valentino-guest pushed a commit to branch master
in repository pykdtree.
commit fe98175fe3667fe6f62e04e2be3d27839709a5fd
Author: Antonio Valentino <antonio.valentino at tiscali.it>
Date: Sun Jun 22 14:27:40 2014 +0200
Enable automatic testing
---
debian/control | 1 +
debian/rules | 16 ++++++++++++++++
debian/tests/control | 2 ++
debian/tests/python2 | 12 ++++++++++++
4 files changed, 31 insertions(+)
diff --git a/debian/control b/debian/control
index 7ea27b3..38a8ab9 100644
--- a/debian/control
+++ b/debian/control
@@ -13,6 +13,7 @@ Standards-Version: 3.9.5
Homepage: https://pypi.python.org/pypi/pykdtree
Vcs-Git: http://anonscm.debian.org/git/pkg-grass/pykdtree.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-grass/pykdtree.git;a=summary
+XS-Testsuite: autopkgtest
Package: python-pykdtree
Architecture: any
diff --git a/debian/rules b/debian/rules
index dafca02..c1ed095 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,5 +4,21 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+PY2VERS = $(shell pyversions -r -v)
+
+
%:
dh $@ --with python2 --buildsystem=python_distutils
+
+
+override_dh_auto_test:
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ set -e -x; \
+ for py in $(PY2VERS); do \
+ cd $(CURDIR)/build/lib.*-$$py; \
+ env PYTHONPATH=. python$$py /usr/bin/nosetests -v pykdtree.test_tree; \
+ done
+endif
+
+
+.PHONY: override_dh_auto_test
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..9a67937
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: python2
+Depends: python-pykdtree, python-all, python-nose
diff --git a/debian/tests/python2 b/debian/tests/python2
new file mode 100755
index 0000000..c3717ec
--- /dev/null
+++ b/debian/tests/python2
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -efu
+
+PYS=${PYS:-"$(pyversions -r 2>/dev/null)"}
+TESTPKG=${TESTPKG:-pykdtree}
+
+cd "$ADTTMP"
+
+for py in $PYS; do
+ echo "=== $py ==="
+ $py /usr/bin/nosetests -v pykdtree 2>&1
+done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pykdtree.git
More information about the Pkg-grass-devel
mailing list