Commit a38253df authored by Tim Peters's avatar Tim Peters

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 e288c91e
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? What's new in ZODB3 3.4b1?
========================== ==========================
Release date: 19-May-2005 Release date: 19-May-2005
......
...@@ -20,7 +20,7 @@ zope svn://svn.zope.org/repos/main/ZODB/tags/*/src/zope ...@@ -20,7 +20,7 @@ zope svn://svn.zope.org/repos/main/ZODB/tags/*/src/zope
# 3.4 and newer: # 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.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: # These are copied in from the ZConfig and zdaemon projects:
# #
......
...@@ -155,6 +155,7 @@ packages = ["BTrees", "BTrees.tests", ...@@ -155,6 +155,7 @@ packages = ["BTrees", "BTrees.tests",
"zope", "zope",
"zope.interface", "zope.interface.tests", "zope.interface", "zope.interface.tests",
"zope.interface.common", "zope.interface.common.tests",
"zope.proxy", "zope.proxy.tests", "zope.proxy", "zope.proxy.tests",
"zope.testing", "zope.testing",
...@@ -187,7 +188,7 @@ def copy_other_files(cmd, outputbase): ...@@ -187,7 +188,7 @@ def copy_other_files(cmd, outputbase):
# A delicate dance to copy files with certain extensions # A delicate dance to copy files with certain extensions
# into a package just like .py files. # into a package just like .py files.
extensions = ["*.conf", "*.xml", "*.txt", "*.sh"] extensions = ["*.conf", "*.xml", "*.txt", "*.sh"]
for dir in [ directories = [
"transaction", "transaction",
"persistent/tests", "persistent/tests",
"ZConfig/components/basic", "ZConfig/components/basic",
...@@ -203,15 +204,31 @@ def copy_other_files(cmd, outputbase): ...@@ -203,15 +204,31 @@ def copy_other_files(cmd, outputbase):
"zdaemon", "zdaemon",
"zdaemon/tests", "zdaemon/tests",
"zope/interface", "zope/interface/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) dir = convert_path(dir)
inputdir = os.path.join("src", dir) inputdir = os.path.join("src", dir)
outputdir = os.path.join(outputbase, dir) outputdir = os.path.join(outputbase, dir)
if not os.path.exists(outputdir): if not os.path.exists(outputdir):
dir_util.mkpath(outputdir) dir_util.mkpath(outputdir)
for pattern in extensions: for pattern in exts:
for fn in glob.glob(os.path.join(inputdir, pattern)): 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 # which must be stripped to get the destination dir
dest = os.path.join(outputbase, fn[4:]) dest = os.path.join(outputbase, fn[4:])
cmd.copy_file(fn, dest) 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