debian/0000755000000000000000000000000012302426774007175 5ustar debian/copyright0000644000000000000000000000460712302155533011127 0ustar Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=174 Upstream-Name: zope.testrunner Upstream-Contact: Zope Foundation and Contributors Source: http://pypi.python.org/pypi/zope.testrunner Files: * Copyright: (c) 2001-2008 Zope Foundation and Contributors. License: Zope-2.1 Zope Public License (ZPL) Version 2.1 . A copyright notice accompanies this license document that identifies the copyright holders. . This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). . Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. . 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. . 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. . 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. . Disclaimer . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/python3-zope.testrunner.install0000644000000000000000000000020412302155533015340 0ustar debian/test_helper_3 usr/share/python3-zope.testrunner debian/test_one_package_in_throwaway_vm.py usr/share/python3-zope.testrunner debian/python-zope.testrunner.install0000644000000000000000000000006412302155533015261 0ustar debian/test_helper usr/share/python-zope.testrunner debian/changelog0000644000000000000000000000564112302426712011045 0ustar zope.testrunner (4.4.2-0ubuntu2) trusty; urgency=low * Restore changes lost in previous upload: - Do not depend on a specific python version. -- Gediminas Paulauskas Sun, 23 Feb 2014 19:18:21 +0200 zope.testrunner (4.4.2-0ubuntu1) trusty; urgency=low * New upstream release. -- Gediminas Paulauskas Sat, 22 Feb 2014 19:29:21 +0200 zope.testrunner (4.4.1-0ubuntu5) trusty; urgency=medium * Do not depend on a specific python version. -- Matthias Klose Sat, 22 Feb 2014 15:36:49 +0100 zope.testrunner (4.4.1-0ubuntu1) saucy; urgency=low * New upstream release. + Drop patches, fixed upstream. -- Gediminas Paulauskas Wed, 10 Jul 2013 19:22:18 +0300 zope.testrunner (4.4.0-0ubuntu2) saucy; urgency=low * debian/tests/control: + Tests require python*-setuptools. + Remove python3-subunit from all-3, subunit support does not work. * test-writes-to-system-directory.patch: fix tests failing with permission denied error. -- Gediminas Paulauskas Tue, 09 Jul 2013 20:11:13 +0300 zope.testrunner (4.4.0-0ubuntu1) saucy; urgency=low * New upstream release. * debian/*.docs: update for moved files. * debian/control: + Remove python3-zope.fixers from Build-Depends, no longer needed. + Remove setuptools from Depends * debian/rules: + Add workaround for dh_python3 not removing setuptools from requires.txt + Install upstream changelog + Do not remove .egg-info on clean * debian/source/options: add to ignore changes in .egg-info directory * test-failures-on-python3.patch: fix a test failure. -- Gediminas Paulauskas Fri, 05 Jul 2013 19:21:38 +0300 zope.testrunner (4.0.3-4) unstable; urgency=low * Team upload. * debian/control: + zope.exceptions >= 4.0.1 is required for python3.3 otherwise it cannot be imported. + Use canonical URI for Vcs-Svn. + Bump Standards-Version to 3.9.4. No changes needed. + Enable autopkgtest. Closes: #692702. -- Arnaud Fontaine Tue, 11 Jun 2013 15:40:01 +0900 zope.testrunner (4.0.3-3) unstable; urgency=low * Team upload. * debian/rules: + Trap shell command errors if any as per Policy 4.6. Closes: #645184. + Clean up build directory for python3 and egg-info directory. Closes: #645186. -- Arnaud Fontaine Fri, 14 Oct 2011 10:52:05 +0900 zope.testrunner (4.0.3-2) unstable; urgency=low * Team upload. [ Arnaud Fontaine ] * debian/control: + Add zope.fixers to Build-Depends (needed for Python 3 only). Closes: #628246. [ Brian Sutherland ] * Correct path to test script in test_helper_3. * Add debian/tests. -- Arnaud Fontaine Mon, 30 May 2011 15:56:08 +0900 zope.testrunner (4.0.3-1) unstable; urgency=low * Initial packaging. -- Brian Sutherland Thu, 28 Apr 2011 12:08:42 +0200 debian/compat0000644000000000000000000000000212302155533010363 0ustar 7 debian/python3-zope.testrunner.docs0000644000000000000000000000157612302155533014637 0ustar README.rst src/zope/testrunner/tests/testrunner.txt src/zope/testrunner/tests/testrunner-simple.txt src/zope/testrunner/tests/testrunner-layers-api.txt src/zope/testrunner/tests/testrunner-layers.txt src/zope/testrunner/tests/testrunner-arguments.txt src/zope/testrunner/tests/testrunner-verbose.txt src/zope/testrunner/tests/testrunner-test-selection.txt src/zope/testrunner/tests/testrunner-progress.txt src/zope/testrunner/tests/testrunner-errors.txt src/zope/testrunner/tests/testrunner-debugging.txt src/zope/testrunner/tests/testrunner-layers-ntd.txt src/zope/testrunner/tests/testrunner-coverage.txt src/zope/testrunner/tests/testrunner-profiling.txt src/zope/testrunner/tests/testrunner-wo-source.txt src/zope/testrunner/tests/testrunner-repeat.txt src/zope/testrunner/tests/testrunner-gc.txt src/zope/testrunner/tests/testrunner-leaks.txt src/zope/testrunner/tests/testrunner-knit.txt debian/test_one_package_in_throwaway_vm.py0000644000000000000000000001370612302155533016336 0ustar #!/usr/bin/python3 """A very quick and dirty script to test a package using the debian/test/control file in a throw away VM. This script needs to run as root and installs a lot of packages arbitrarily. If it breaks the installation it's run on, you get to keep both pieces. Usage: test_one_package_in_throwaway_vm.py zope.interface (apt-get source zope.interface, unpack and test) """ import shutil import tempfile import os import stat import sys import unittest import logging import subprocess class Dependency(object): def __init__(self, package): self.package = package class _Test(unittest.TestCase): def __init__(self, tests_dir, name, restrictions=frozenset(), features=frozenset(), depends=(), parse_context=None): unittest.TestCase.__init__(self, methodName='runTest') self._name = name self._restrictions = restrictions self._features = features self._depends = depends self._tests_dir = tests_dir if parse_context is None: parse_context = {} self._parse_context = parse_context def assertDependencies(self): """Install dependencies/check if they are installed or error""" for d in self._depends: logging.info("Installing: %s", d.package) subprocess.check_call(['apt-get', '--force-yes', '-y', 'install', d.package]) def runTest(self): self.assertDependencies() logging.info("RUNNING %s", self._name) binary = os.path.join(self._tests_dir, self._name) binary = os.path.abspath(binary) subprocess.check_call(['/bin/chmod', 'a+x', binary]) tmpdir = tempfile.mkdtemp() try: env = {'TMPDIR': tmpdir} env.update(os.environ) # ??? p = subprocess.Popen(['sudo', '-u', 'nobody', binary], stdin=subprocess.PIPE, stderr=subprocess.PIPE, env=env) stdout, stderr = p.communicate() finally: shutil.rmtree(tmpdir) msg = "" if stderr: msg = msg + "Test Printed to stderr:\n\n%s\n" % stderr.decode('utf-8') self.assertFalse(stderr, msg) if p.returncode != 0: logging.error(msg) self.assertEquals(p.returncode, 0) class Parser(object): def __init__(self): self.tests = [] def _add_test(self, stanza, filename, lineno): pc = dict(filename=filename, lineno=lineno) tests = stanza.pop('tests') tests_dir = stanza.pop('tests_dir', 'debian/tests') if 'depends' not in stanza: stanza['depends'] = tuple(self._normalize_dep('@')) for test in tests: self.tests.append(_Test(tests_dir, test, parse_context=pc, **stanza)) def _normalize_dep(self, dep): dep = dep.strip() assert ' ' not in dep, dep assert dep, dep if dep != '@': return [Dependency(dep)] deps = [] data = open('debian/control', 'r', encoding='utf-8').read() for line in data.splitlines(): if not line.startswith("Package:"): continue line = line[8:].strip() deps.append(Dependency(line)) return deps def parse(self): filename = 'debian/tests/control' data = open(filename, 'r').read() stanza = {} skipping = False startline = 1 for lineno, line in enumerate(data.splitlines()): if not line: if skipping: skipping = False stanza = {} startline = lineno + 1 continue if stanza: self._add_test(stanza, filename, startline) stanza = {} startline = lineno + 1 elif skipping: continue elif line.startswith("Tests:"): line = line[6:].strip() stanza['tests'] = frozenset(line.split()) elif line.startswith("Depends:"): line = line[8:].strip() deps = [] for d in line.split(','): deps.extend(self._normalize_dep(d)) stanza['depends'] = tuple(deps) elif line.startswith("Features:"): line = line[9:].strip() stanza['features'] = features= frozenset(line.split()) elif line.startswith("Restrictions:"): line = line[13:].strip() stanza['restrictions'] = restrictions = frozenset(line.split()) elif line.startswith("Tests-Directory:"): line = line[16:].strip() stanza['tests_dir'] = frozenset(line.split()) else: logging.warn("Skipped stanza due to unknown field: %s: %s" % (lineno, line)) skipping = True if stanza and not skipping: # catch last parsed stanza self._add_test(stanza, filename, startline) if __name__ == '__main__': logging.basicConfig(level=logging.INFO) logging.info("Updating") subprocess.check_call(['apt-get', 'install', 'sudo']) subprocess.check_call(['apt-get', 'update']) mytemp = tempfile.mkdtemp() subprocess.check_call(['/bin/chmod', 'a+rx', mytemp]) os.chdir(mytemp) logging.info("Getting and un-packing source") subprocess.check_call(['apt-get', 'source', sys.argv[1]]) for d in os.listdir(mytemp): sourcedir = os.path.join(mytemp, d) if os.path.isdir(sourcedir): break else: raise Exception("Could not find unpacked source in %s" % mytemp) os.chdir(sourcedir) logging.info("Running tests from %s" % sourcedir) p = Parser() p.parse() suite = unittest.TestSuite(tests=p.tests) runner = unittest.TextTestRunner() result = runner.run(suite) logging.info("Tests were run in %s" % sourcedir) sys.exit(not result.wasSuccessful()) debian/watch0000644000000000000000000000015312302155533010215 0ustar version=3 http://pypi.python.org/packages/source/z/zope.testrunner/zope.testrunner-(.*)(?:\.tar\.gz|\.zip) debian/source/0000755000000000000000000000000012302426772010473 5ustar debian/source/format0000644000000000000000000000001412302155533011673 0ustar 3.0 (quilt) debian/source/options0000644000000000000000000000050312302155533012101 0ustar # Ignore changes on .egg-info directory to prevent issue while building # twice as dpkg-source do not ignore the automatic patch anymore. Deleting # the files does not work as it was generated through sdist target using # SVN, thus some files might be missing (such as zcml or txt files). extend-diff-ignore = "\.egg-info" debian/rules0000755000000000000000000000220212302426020010231 0ustar #!/usr/bin/make -f %: dh $@ --with python2 --with python3 PACKAGE=python-zope.testrunner PACKAGE_PYTHON3=python3-zope.testrunner PYTHON3=$(shell py3versions -r) override_dh_auto_clean: dh_auto_clean # Specific to python3 rm -rf build override_dh_auto_build: dh_auto_build -p$(PACKAGE) set -ex; \ for python in $(PYTHON3); do \ $$python setup.py build; \ done override_dh_auto_install: dh_auto_install -p$(PACKAGE) --destdir=$(CURDIR)/debian/$(PACKAGE) set -ex; \ for python in $(PYTHON3); do \ $$python setup.py install --install-layout=deb \ --root=$(CURDIR)/debian/$(PACKAGE_PYTHON3); \ done mv $(CURDIR)/debian/$(PACKAGE_PYTHON3)/usr/bin/zope-testrunner \ $(CURDIR)/debian/$(PACKAGE_PYTHON3)/usr/bin/zope-testrunner3 override_dh_python2: dh_python2 --shebang=/usr/bin/python override_dh_python3: dh_python3 --shebang=/usr/bin/python3 override_dh_gencontrol: dh_gencontrol # Workaround for dh_python3 not removing python-setuptools from requires.txt find debian/$(PACKAGE_PYTHON3) -name requires.txt -exec sed -i '/^setuptools$$/d' {} \; override_dh_installchangelogs: dh_installchangelogs CHANGES.rst debian/test_helper0000644000000000000000000000155312302155533011432 0ustar # 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 debian/control0000644000000000000000000000366212302155533010577 0ustar Source: zope.testrunner Section: zope Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian/Ubuntu Zope Team Uploaders: Brian Sutherland Build-Depends: debhelper (>= 7.0.50~), python-all (>= 2.6.6-3~), python3-all, python-setuptools, python3-setuptools, Standards-Version: 3.9.4 X-Python-Version: >= 2.4 X-Python3-Version: >= 3.1 XS-Testsuite: autopkgtest Homepage: http://pypi.python.org/pypi/zope.testrunner Vcs-Svn: svn://anonscm.debian.org/pkg-zope/zope.testrunner/trunk Vcs-Browser: http://svn.debian.org/viewsvn/pkg-zope/zope.testrunner/trunk Package: python3-zope.testrunner Architecture: all Depends: python3-zope, ${python3:Depends}, ${misc:Depends}, python3-zope.exceptions (>= 4.0.1~) Provides: ${python3:Provides} Description: Flexible test runner with layer support for Python 3 The testrunner module is used to run automated tests defined using the unittest framework and previously available in zope.testing. . Its primary feature is that it finds tests by searching directory trees. It doesn't require the manual concatenation of specific test suites. It is highly customizable and should be usable with any project. Package: python-zope.testrunner Architecture: all Depends: python-zope, ${python:Depends}, ${misc:Depends} Replaces: python-zope.testing (<< 3.10.0) Breaks: python-zope.testing (<< 3.10.0) Provides: ${python:Provides} Description: Flexible test runner with layer support for Python The testrunner module is used to run automated tests defined using the unittest framework and previously available in zope.testing. . Its primary feature is that it finds tests by searching directory trees. It doesn't require the manual concatenation of specific test suites. It is highly customizable and should be usable with any project. debian/python-zope.testrunner.docs0000644000000000000000000000157612302155533014554 0ustar README.rst src/zope/testrunner/tests/testrunner.txt src/zope/testrunner/tests/testrunner-simple.txt src/zope/testrunner/tests/testrunner-layers-api.txt src/zope/testrunner/tests/testrunner-layers.txt src/zope/testrunner/tests/testrunner-arguments.txt src/zope/testrunner/tests/testrunner-verbose.txt src/zope/testrunner/tests/testrunner-test-selection.txt src/zope/testrunner/tests/testrunner-progress.txt src/zope/testrunner/tests/testrunner-errors.txt src/zope/testrunner/tests/testrunner-debugging.txt src/zope/testrunner/tests/testrunner-layers-ntd.txt src/zope/testrunner/tests/testrunner-coverage.txt src/zope/testrunner/tests/testrunner-profiling.txt src/zope/testrunner/tests/testrunner-wo-source.txt src/zope/testrunner/tests/testrunner-repeat.txt src/zope/testrunner/tests/testrunner-gc.txt src/zope/testrunner/tests/testrunner-leaks.txt src/zope/testrunner/tests/testrunner-knit.txt debian/test_helper_30000644000000000000000000000156012302155533011652 0ustar # 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-testrunner3 -k --test-path ${py_libdir_sh} ${testfilter} ${python} /usr/bin/zope-testrunner3 -k --test-path ${py_libdir_sh} ${testfilter} done debian/tests/0000755000000000000000000000000012302426772010335 5ustar debian/tests/all0000644000000000000000000000013412302155533011020 0ustar #!/bin/bash testfilter="-s zope.testrunner" . /usr/share/python-zope.testrunner/test_helper debian/tests/all-30000644000000000000000000000013712302155533011163 0ustar #!/bin/bash testfilter="-s zope.testrunner" . /usr/share/python3-zope.testrunner/test_helper_3 debian/tests/control0000644000000000000000000000032512302164773011740 0ustar Tests: all Depends: python-all, python-zope.testing, python-zope.testrunner, python-subunit, python-setuptools Tests: all-3 Depends: python3-all, python3-zope.testing, python3-zope.testrunner, python3-setuptools