Commit 61f10100 authored by Tim Peters's avatar Tim Peters

Merge rev 30518 from 3.4 branch.

Change test.py to use zope.testing.testrunner, and update the
latter to Jim's development version.  Hardest part turned out
to be teaching ZODB's setup.py how to "build" this version of
zope.testing (it has a lot of packages in a test directory,
where the latter is not itself a package).

Incidentally repaired an oversight in building zope.interface
too.
parent 858c408a
......@@ -3,6 +3,18 @@ What's new in ZODB3 3.5a0?
Release date: DD-MMM-YYYY
What's new in ZODB3 3.4b2?
==========================
Release date: DD-May-2005
Development
-----------
- ZODB's ``test.py`` is now a small driver for the shared
``zope.testing.testrunner``. See the latter's documentation
for command-line arguments.
What's new in ZODB3 3.4b1?
==========================
Release date: 19-May-2005
......
......@@ -20,7 +20,7 @@ zope svn://svn.zope.org/repos/main/ZODB/tags/*/src/zope
# 3.4 and newer:
#
zope.interface svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a3/src/zope/interface
zope.testing svn://svn.zope.org/repos/main/Zope3/tags/ZopeX3-3.0.0-Zope-2.8-a3/src/zope/testing
zope.testing svn://svn.zope.org/repos/main/zope.testing/trunk/src/zope/testing
# These are copied in from the ZConfig and zdaemon projects:
#
......
......@@ -155,6 +155,7 @@ packages = ["BTrees", "BTrees.tests",
"zope",
"zope.interface", "zope.interface.tests",
"zope.interface.common", "zope.interface.common.tests",
"zope.proxy", "zope.proxy.tests",
"zope.testing",
......@@ -187,7 +188,7 @@ def copy_other_files(cmd, outputbase):
# A delicate dance to copy files with certain extensions
# into a package just like .py files.
extensions = ["*.conf", "*.xml", "*.txt", "*.sh"]
for dir in [
directories = [
"transaction",
"persistent/tests",
"ZConfig/components/basic",
......@@ -203,15 +204,31 @@ def copy_other_files(cmd, outputbase):
"zdaemon",
"zdaemon/tests",
"zope/interface", "zope/interface/tests",
]:
"zope/testing",
]
# zope.testing's testrunner-ex is not a package, but contains
# packages, in a fairly elaborate subtree. Major special-casing
# for this. First find all the (non-SVN) directories starting
# there, and append them all to `directories`.
for root, dirs, files in os.walk("src/zope/testing/testrunner-ex"):
dirs[:] = [d for d in dirs if ".svn" not in d]
assert root.startswith("src/")
normpath = root[4:].replace("\\", "/")
directories.append(normpath)
for dir in directories:
exts = extensions
if dir.startswith("zope/testing/testrunner-ex"):
# testrunner-ex isn't a package, so not even the .py files
# get copied unless we force that there.
exts = extensions + ["*.py"]
dir = convert_path(dir)
inputdir = os.path.join("src", dir)
outputdir = os.path.join(outputbase, dir)
if not os.path.exists(outputdir):
dir_util.mkpath(outputdir)
for pattern in extensions:
for pattern in exts:
for fn in glob.glob(os.path.join(inputdir, pattern)):
# glob is going to give us a path include "src",
# glob is going to give us a path including "src",
# which must be stripped to get the destination dir
dest = os.path.join(outputbase, fn[4:])
cmd.copy_file(fn, dest)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment