[Python-modules-commits] [yattag] 05/06: run tests at build time

Sandro Tosi morph at moszumanska.debian.org
Thu Apr 7 23:48:35 UTC 2016


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

morph pushed a commit to branch master
in repository yattag.

commit 5bc6926b6087badb04ccf76402fb2a67b5543d1a
Author: Sandro Tosi <morph at debian.org>
Date:   Fri Apr 8 00:37:50 2016 +0100

    run tests at build time
---
 debian/rules | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/debian/rules b/debian/rules
index 27f2493..65ce58f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,25 @@ PY3VERS := $(shell py3versions -s)
 %:
 	dh $@ --with python2,python3
 
+override_dh_auto_build:
+	set -e ; \
+	for python in $(PY2VERS) $(PY3VERS); do \
+		$$python setup.py build; \
+	done
+
+override_dh_auto_test:
+ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
+	# run tests
+	for test in test/tests_* ;\
+	do \
+	    for python in $(PY2VERS) $(PY3VERS); do \
+		echo "running "$$test" on "$$python ; \
+		LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print(b.build_purelib)") ; \
+		PYTHONPATH=$(CURDIR)/$$LIB $$python $$test ; \
+	    done ; \
+	done
+endif
+
 override_dh_auto_install:
 	set -e ; \
 	for python in $(PY2VERS); do \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/yattag.git



More information about the Python-modules-commits mailing list