r1913 - in zope.testing/trunk/debian (5 files)

kobold at users.alioth.debian.org kobold at users.alioth.debian.org
Tue Dec 22 12:08:49 UTC 2009


    Date: Tuesday, December 22, 2009 @ 12:08:42
  Author: kobold
Revision: 1913

Convert to debhelper 7 and the pydeb dh7 extension.

Modified:
  zope.testing/trunk/debian/changelog
  zope.testing/trunk/debian/compat
  zope.testing/trunk/debian/control
  zope.testing/trunk/debian/rules
  zope.testing/trunk/debian/tests/all

Modified: zope.testing/trunk/debian/changelog
===================================================================
--- zope.testing/trunk/debian/changelog	2009-12-22 11:53:01 UTC (rev 1912)
+++ zope.testing/trunk/debian/changelog	2009-12-22 12:08:42 UTC (rev 1913)
@@ -1,3 +1,9 @@
+zope.testing (3.8.3-3) unstable; urgency=low
+
+  * Convert to debhelper 7 and the pydeb dh7 extension.
+
+ -- Fabio Tranchitella <kobold at debian.org>  Tue, 22 Dec 2009 13:07:52 +0100
+
 zope.testing (3.8.3-2) unstable; urgency=low
 
   * debian/control: build-depend on pyton-vab.pydeb >= 1.3.0-2.

Modified: zope.testing/trunk/debian/compat
===================================================================
--- zope.testing/trunk/debian/compat	2009-12-22 11:53:01 UTC (rev 1912)
+++ zope.testing/trunk/debian/compat	2009-12-22 12:08:42 UTC (rev 1913)
@@ -1 +1 @@
-4
+7

Modified: zope.testing/trunk/debian/control
===================================================================
--- zope.testing/trunk/debian/control	2009-12-22 11:53:01 UTC (rev 1912)
+++ zope.testing/trunk/debian/control	2009-12-22 12:08:42 UTC (rev 1913)
@@ -3,18 +3,19 @@
 Priority: optional
 Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers at lists.alioth.debian.org>
 Uploaders: Brian Sutherland <brian at vanguardistas.net>, Fabio Tranchitella <kobold at debian.org>, Matthias Klose <doko at ubuntu.com>
-Build-Depends: debhelper (>= 5.0.38), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6), python-setuptools (>= 0.6b3), python-van.pydeb (>= 1.3.0-2)
+Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6), python-setuptools (>= 0.6b3), python-van.pydeb (>= 1.3.0-4)
 Standards-Version: 3.8.3
 XS-Python-Version: all
 XS-Vcs-Svn: svn://svn.debian.org/pkg-zope/zope.testing/trunk
 
 Package: python-zope.testing
 Architecture: all
-Depends: ${setuptools:Depends}, ${python:Depends}, ${shlibs:Depends}
-Provides: ${python:Provides}
-Recommends: ${setuptools:Recommends}
+Depends: ${pydeb:Depends}, ${python:Depends}, ${misc:Depends}
+Recommends: ${pydeb:Recommends}
+Provides: ${pydeb:Provides}
+Suggests: ${python:Provides}, ${pydeb:Suggests}
 Conflicts: zope3, python-zodb (<< 2.9)
 XB-Python-Version: ${python:Versions}
-Description: the zope testing framework, including the testrunner script
+Description: The zope testing framework, including the testrunner script
  This package provides a number of testing frameworks. It includes a flexible
  test runner, and supports both doctest and unittest. 

Modified: zope.testing/trunk/debian/rules
===================================================================
--- zope.testing/trunk/debian/rules	2009-12-22 11:53:01 UTC (rev 1912)
+++ zope.testing/trunk/debian/rules	2009-12-22 12:08:42 UTC (rev 1913)
@@ -1,6 +1,4 @@
 #!/usr/bin/make -f
 
-include /usr/share/python-van.pydeb/rules_templates/rules.1.mk
-
-post-install-python%:
-	mv debian/$(package)/usr/bin/zope-testrunner debian/$(package)/usr/bin/zope-testrunner$*
+%:
+	dh --with pydeb --with python-central $@

Modified: zope.testing/trunk/debian/tests/all
===================================================================
--- zope.testing/trunk/debian/tests/all	2009-12-22 11:53:01 UTC (rev 1912)
+++ zope.testing/trunk/debian/tests/all	2009-12-22 12:08:42 UTC (rev 1913)
@@ -2,33 +2,25 @@
 
 set -e
 
+if [ "z${testfilter}" == z ]; then
+   if [ -x /usr/bin/van-pydeb ]; then
+       testfilter="-s $(van-pydeb src_to_py $(dpkg-parsechangelog -c1 -ldebian/changelog | grep 'Source: ' | sed 's/Source: //'))"
+   else
+       echo "Could not find van-pydeb to guess the python package name. You should have your tests depend on it or you "
+       echo "must specify testfilter variable, something like -p package_name, see zope-testrunner --help for details."
+       exit 1
+   fi
+fi 
+
 PYVERS=$(pyversions -vr debian/control)
-TMPFILE=$(mktemp)
 
-cat > $TMPFILE << EOF
-import sys
-from zope.testing import testrunner
-
-subs = (sys.version_info[0], sys.version_info[1])
-test_path = '/usr/lib/python%s.%s/site-packages/' % subs
-
-
-
-exitcode = testrunner.run([
-                '--tests-pattern', '^f?tests$',
-                '-s', 'zope.testing',
-                '--test-path', test_path
-                ])
-sys.exit(exitcode)
-EOF
-
 for version in ${PYVERS}; do
+    echo Running tests for python${version}: /usr/bin/zope-testrunner${version} -v -k --test-path /usr/lib/python${version}/site-packages/ ${testfilter}
     stderr=$(mktemp)
-    python${version} ${TMPFILE} 2>${stderr}
+    /usr/bin/zope-testrunner${version} -v -k --test-path /usr/lib/python${version}/site-packages/ ${testfilter} 2>${stderr}
     # ignoring 'Not printing coverage data for' - spurious failure on python2.4
-    # last "cat" in pipe below because grep exits with nonzero exit status if no match.
+    # last "cat" in pipe below because grep exits with nonzero exit status if
+    # no match.
     cat ${stderr} | grep -v 'Not printing coverage data for' | grep -v 'A message on stderr.  Please ignore (expected in test output).' | cat >&2
     rm ${stderr}
 done
-
-rm $TMPFILE




More information about the pkg-zope-developers mailing list