Commit c4d8d01c authored by Jim Fulton's avatar Jim Fulton

Updated the test runner to make inplace instances work better.

Also, now tests will be searched for in lib/python of instances.
parent ac25895d
...@@ -240,12 +240,6 @@ class ZopeCmd(ZDCmd): ...@@ -240,12 +240,6 @@ class ZopeCmd(ZDCmd):
script = os.path.join(zope_home, 'bin', 'test.py') script = os.path.join(zope_home, 'bin', 'test.py')
assert os.path.exists(script) assert os.path.exists(script)
# If --libdir is not supplied, use $INSTANCE_HOME/Products
# (rather than $INSTANCE_HOME/lib/python)
if '--libdir' not in args:
args.insert(0, 'Products')
args.insert(0, '--package')
# Supply our config file by default. # Supply our config file by default.
if '--config-file' not in args and '-C' not in args: if '--config-file' not in args and '-C' not in args:
args.insert(0, self.options.configfile) args.insert(0, self.options.configfile)
......
...@@ -49,8 +49,10 @@ sys.path.insert(0, shome) ...@@ -49,8 +49,10 @@ sys.path.insert(0, shome)
defaults = '--tests-pattern ^tests$ -v'.split() defaults = '--tests-pattern ^tests$ -v'.split()
if ihome: if ihome:
ihome = os.path.abspath(ihome) ihome = os.path.abspath(ihome)
sys.path.insert(0, os.path.join(ihome, 'lib', 'python')) defaults += ['--path', os.path.join(ihome, 'lib', 'python')]
defaults += ['--test-path', ihome, '--package', 'Products'] products = os.path.join(ihome, 'Products')
if os.path.exists(products):
defaults += ['--package-path', products, 'Products']
else: else:
defaults += ['--test-path', shome] defaults += ['--test-path', shome]
......
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