[SCM] pyliblo/master: Run python tests

mira-guest at users.alioth.debian.org mira-guest at users.alioth.debian.org
Wed Aug 28 10:13:50 UTC 2013


The following commit has been merged in the master branch:
commit c678b526c27ad4d290b82830fd399d98eca82747
Author: Jaromír Mikeš <mira.mikes at seznam.cz>
Date:   Wed Aug 28 14:02:53 2013 +0200

    Run python tests

diff --git a/debian/rules b/debian/rules
index 60444d9..9fd4a13 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,6 @@ PYTHON3=$(shell py3versions -vr)
 
 build-python%:
 	python$* setup.py build --with-cython
-	debian/tests/python-liblo
 
 override_dh_auto_build: $(PYTHON3:%=build-python%)
 	dh_auto_build
@@ -19,5 +18,15 @@ install-python%:
 override_dh_auto_install: $(PYTHON3:%=install-python%)
 	dh_auto_install
 
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+pythonpath = $$(ls -d $(CURDIR)/build/lib.*-$(1))
+
+test-python%:
+	PYTHONPATH=$(call pythonpath,$*) \
+		python$* -m unittest discover -s test/ -p '*.py' -v
+
+override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
+endif
+
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS

-- 
pyliblo packaging



More information about the pkg-multimedia-commits mailing list