[Python-modules-commits] r15442 - in packages/python-geohash/trunk/debian (rules)

davide125-guest at users.alioth.debian.org davide125-guest at users.alioth.debian.org
Thu Feb 3 17:59:36 UTC 2011


    Date: Thursday, February 3, 2011 @ 17:59:34
  Author: davide125-guest
Revision: 15442

run tests during package build

Modified:
  packages/python-geohash/trunk/debian/rules

Modified: packages/python-geohash/trunk/debian/rules
===================================================================
--- packages/python-geohash/trunk/debian/rules	2011-02-03 17:48:30 UTC (rev 15441)
+++ packages/python-geohash/trunk/debian/rules	2011-02-03 17:59:34 UTC (rev 15442)
@@ -4,6 +4,11 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+# necessary for override_dh_auto_test
+PYVERS = $(shell pyversions -r -v)
+pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
+pythonpath_dbg = $$(ls -d $(CURDIR)/build/lib_d.*-$(1) 2>/dev/null || ls -d $(CURDIR)/build/lib.*$(1)-pydebug)
+
 %:
 	dh  $@
 
@@ -22,3 +27,16 @@
 	# Workaround for #576014
 	cd debian/python-geohash-dbg/usr/lib/debug/usr/lib && mv pyshared pymodules
 endif
+
+override_dh_auto_test:
+ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+	set -e ;\
+	for py in $(PYVERS); do \
+		for test in test_encode test_decode; do \
+			PYTHONPATH=$(call pythonpath,$$py) \
+				python$$py test/$$test.py ;\
+			PYTHONPATH=$(call pythonpath_dbg,$$py) \
+				python$$py test/$$test.py ;\
+		done \
+	done
+endif




More information about the Python-modules-commits mailing list