[Python-modules-commits] [pydbus] 02/02: Use upstream's custom tests during dh_auto_test

Alberto Caso acaso-guest at moszumanska.debian.org
Sat Dec 10 12:18:25 UTC 2016


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

acaso-guest pushed a commit to branch master
in repository pydbus.

commit 3714c7b8e9916eee01f35006ed5fedbcd8432bff
Author: Alberto Caso <alberto.caso at juntaex.es>
Date:   Sat Dec 10 13:18:06 2016 +0100

    Use upstream's custom tests during dh_auto_test
---
 debian/control      |  5 ++++-
 debian/rules        |  4 ++++
 debian/run_tests.sh | 19 +++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index 96714c5..15cb508 100644
--- a/debian/control
+++ b/debian/control
@@ -3,11 +3,14 @@ Section: python
 Priority: extra
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Alberto Caso <alberto.caso at juntaex.es>
-Build-Depends: debhelper (>= 9),
+Build-Depends: dbus,
+               debhelper (>= 9),
                dh-python,
                python-all,
+               python-gi,
                python-setuptools,
                python3-all,
+               python3-gi,
                python3-setuptools
 Standards-Version: 3.9.8
 Homepage: https://github.com/LEW21/pydbus
diff --git a/debian/rules b/debian/rules
index fc95b09..6787de2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,3 +9,7 @@ export PYBUILD_NAME=pydbus
 	dh $@ --with python2,python3 --buildsystem=pybuild
 
 
+override_dh_auto_test:
+	PYBUILD_SYSTEM=custom \
+	PYBUILD_TEST_ARGS="debian/run_tests.sh {interpreter}" \
+	dh_auto_test
diff --git a/debian/run_tests.sh b/debian/run_tests.sh
new file mode 100755
index 0000000..a165559
--- /dev/null
+++ b/debian/run_tests.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+
+# Based on upstream's unreleased https://github.com/LEW21/pydbus/blob/master/tests/run.sh
+# TODO: consider using upstream's script when it is included in an upstream release.
+# TODO: consider moving to debian/tests for integration with autokpkgtests if it fits.
+
+PYTHON=${1:-python}
+
+# In the 0.5.1 release, tests/context requires a Notify daemon.
+# Disable this test for now.
+# dbus-run-session "$PYTHON" -m pydbus.tests.context
+
+dbus-run-session "$PYTHON" -m pydbus.tests.identifier
+if [ "$2" != "dontpublish" ]
+then
+	dbus-run-session "$PYTHON" -m pydbus.tests.publish
+	dbus-run-session "$PYTHON" -m pydbus.tests.publish_multiface
+fi

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



More information about the Python-modules-commits mailing list