r1920 - in zope.testing/trunk/debian (rules test_helper tests/all)

kobold at users.alioth.debian.org kobold at users.alioth.debian.org
Tue Dec 22 21:08:54 UTC 2009


    Date: Tuesday, December 22, 2009 @ 21:08:53
  Author: kobold
Revision: 1920

fixed automated tests

Modified:
  zope.testing/trunk/debian/rules
  zope.testing/trunk/debian/test_helper
  zope.testing/trunk/debian/tests/all

Modified: zope.testing/trunk/debian/rules
===================================================================
--- zope.testing/trunk/debian/rules	2009-12-22 19:19:27 UTC (rev 1919)
+++ zope.testing/trunk/debian/rules	2009-12-22 21:08:53 UTC (rev 1920)
@@ -2,3 +2,16 @@
 
 %:
 	dh --with pydeb --with python-central $@
+
+package=python-zope.testing
+
+override_dh_install:
+	dh_install
+	# console scripts
+	for script in debian/$(package)/usr/bin/*; do \
+	  for py in $(shell pyversions -vr debian/control); do \
+	    cat $$script |  sed -e "s,/usr/bin/python,/usr/bin/python$$py,g" > $$script$$py; \
+	    chmod 755 $$script$$py; \
+	  done; \
+      rm $$script; \
+	done;

Modified: zope.testing/trunk/debian/test_helper
===================================================================
--- zope.testing/trunk/debian/test_helper	2009-12-22 19:19:27 UTC (rev 1919)
+++ zope.testing/trunk/debian/test_helper	2009-12-22 21:08:53 UTC (rev 1920)
@@ -2,9 +2,9 @@
 
 set -e
 
-if [ "z${testfilter}" == z ]; then
+if [ -z "${testfilter}" ]; 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: //'))"
+       testfilter="-m $(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."
@@ -13,8 +13,7 @@
 fi 
 
 PYVERS=$(pyversions -vr debian/control)
-
 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}
-    /usr/bin/zope-testrunner${version} -v -k --test-path /usr/lib/python${version}/site-packages/ ${testfilter}
+    echo Running tests for python${version}: /usr/bin/zope-testrunner${version} -k --test-path /usr/lib/python${version}/site-packages ${testfilter}
+    /usr/bin/zope-testrunner${version} -k --test-path /usr/lib/python${version}/site-packages ${testfilter}
 done

Modified: zope.testing/trunk/debian/tests/all
===================================================================
--- zope.testing/trunk/debian/tests/all	2009-12-22 19:19:27 UTC (rev 1919)
+++ zope.testing/trunk/debian/tests/all	2009-12-22 21:08:53 UTC (rev 1920)
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/bin/bashh
 
 set -e
 
-if [ "z${testfilter}" == z ]; then
+if [ -z "${testfilter}" ]; 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: //'))"
+       testfilter="-m $(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."
@@ -13,11 +13,10 @@
 fi 
 
 PYVERS=$(pyversions -vr debian/control)
-
 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}
+    echo Running tests for python${version}: /usr/bin/zope-testrunner${version} -k --test-path /usr/lib/python${version}/site-packages ${testfilter}
     stderr=$(mktemp)
-    /usr/bin/zope-testrunner${version} -v -k --test-path /usr/lib/python${version}/site-packages/ ${testfilter} 2>${stderr}
+    /usr/bin/zope-testrunner${version} -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.




More information about the pkg-zope-developers mailing list