r2193 - in zope.testrunner/trunk/debian (6 files)

jinty-guest at users.alioth.debian.org jinty-guest at users.alioth.debian.org
Fri Apr 29 08:53:11 UTC 2011


    Date: Friday, April 29, 2011 @ 08:53:10
  Author: jinty-guest
Revision: 2193

Test helpers for python2 and 3. Also replace zope.testing.

Added:
  zope.testrunner/trunk/debian/python-zope.testrunner.install
  zope.testrunner/trunk/debian/python3-zope.testrunner.install
  zope.testrunner/trunk/debian/test_helper
  zope.testrunner/trunk/debian/test_helper_3
Modified:
  zope.testrunner/trunk/debian/control
  zope.testrunner/trunk/debian/rules

Modified: zope.testrunner/trunk/debian/control
===================================================================
--- zope.testrunner/trunk/debian/control	2011-04-29 08:49:57 UTC (rev 2192)
+++ zope.testrunner/trunk/debian/control	2011-04-29 08:53:10 UTC (rev 2193)
@@ -11,7 +11,7 @@
 
 Package: python3-zope.testrunner
 Architecture: all
-Depends: ${python3:Depends}, ${misc:Depends}
+Depends: python3-zope, python3-setuptools, ${python3:Depends}, ${misc:Depends}
 Provides: ${python3:Provides}
 Description: The zope testing framework, including the testrunner script
  The testrunner module is used to run automated tests defined using the
@@ -22,7 +22,9 @@
 
 Package: python-zope.testrunner
 Architecture: all
-Depends: ${python:Depends}, ${misc:Depends}
+Depends: python-zope, python-setuptools, ${python:Depends}, ${misc:Depends}
+Replaces: python-zope.testing
+Breaks: python-zope.testing (<< 3.10.0)
 Provides: ${python:Provides}
 Description: A flexible test runner with layer support
  The testrunner module is used to run automated tests defined using the

Added: zope.testrunner/trunk/debian/python-zope.testrunner.install
===================================================================
--- zope.testrunner/trunk/debian/python-zope.testrunner.install	                        (rev 0)
+++ zope.testrunner/trunk/debian/python-zope.testrunner.install	2011-04-29 08:53:10 UTC (rev 2193)
@@ -0,0 +1 @@
+debian/test_helper usr/share/python-zope.testrunner

Added: zope.testrunner/trunk/debian/python3-zope.testrunner.install
===================================================================
--- zope.testrunner/trunk/debian/python3-zope.testrunner.install	                        (rev 0)
+++ zope.testrunner/trunk/debian/python3-zope.testrunner.install	2011-04-29 08:53:10 UTC (rev 2193)
@@ -0,0 +1 @@
+debian/test_helper_3 usr/share/python3-zope.testrunner

Modified: zope.testrunner/trunk/debian/rules
===================================================================
--- zope.testrunner/trunk/debian/rules	2011-04-29 08:49:57 UTC (rev 2192)
+++ zope.testrunner/trunk/debian/rules	2011-04-29 08:53:10 UTC (rev 2193)
@@ -20,7 +20,6 @@
 		python$$pyvers setup.py install --install-layout=deb \
 			--root $(CURDIR)/debian/$(package); \
 	done
-	rm $(CURDIR)/debian/$(package)/usr/bin/zope-testrunner # provided by zope.testing till we migrate
 	set -x; \
 	for pyvers in $(shell py3versions -vs); do \
 		python$$pyvers setup.py install --install-layout=deb \

Added: zope.testrunner/trunk/debian/test_helper
===================================================================
--- zope.testrunner/trunk/debian/test_helper	                        (rev 0)
+++ zope.testrunner/trunk/debian/test_helper	2011-04-29 08:53:10 UTC (rev 2193)
@@ -0,0 +1,20 @@
+# includable shell script to make test scripts smaller
+
+set -e
+
+if [ -z "${testfilter}" ]; then
+   if [ -x /usr/bin/van-pydeb ]; then
+       testfilter="-s $(van-pydeb src_to_py $(grep 'Source: ' debian/control | 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 -r debian/control)
+for python in ${PYVERS}; do
+    py_libdir_sh=$(${python} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+    echo Running tests for ${python}: /usr/bin/zope-testrunner -k --test-path ${py_libdir_sh} ${testfilter}
+    ${python} /usr/bin/zope-testrunner -k --test-path ${py_libdir_sh} ${testfilter}
+done

Added: zope.testrunner/trunk/debian/test_helper_3
===================================================================
--- zope.testrunner/trunk/debian/test_helper_3	                        (rev 0)
+++ zope.testrunner/trunk/debian/test_helper_3	2011-04-29 08:53:10 UTC (rev 2193)
@@ -0,0 +1,20 @@
+# includable shell script to make test scripts smaller
+
+set -e
+
+if [ -z "${testfilter}" ]; then
+   if [ -x /usr/bin/van-pydeb ]; then
+       testfilter="-s $(van-pydeb src_to_py $(grep 'Source: ' debian/control | 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 
+
+PY3VERS=$(py3versions -r debian/control)
+for python in ${PY3VERS}; do
+    py_libdir_sh=$(${python} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
+    echo Running tests for ${python}: /usr/bin/zope-testrunner -k --test-path ${py_libdir_sh} ${testfilter}
+    ${python} /usr/bin/zope-testrunner -k --test-path ${py_libdir_sh} ${testfilter}
+done




More information about the pkg-zope-developers mailing list