Commit b6600112 authored by Tres Seaver's avatar Tres Seaver

Zope2.Startup.zopectl: fork before execv when running unit tests

Avoids exiting the zopectl shell, if run from there.
parent 702c4880
...@@ -26,6 +26,9 @@ Zope Changes ...@@ -26,6 +26,9 @@ Zope Changes
Bugs Fixed Bugs Fixed
- Zope2.Startup.zopectl: fork before execv when running unit tests
(don't exit the shell, if run from there).
- TAL: MassageIDs are now handled the same way as in zope.tal. - TAL: MassageIDs are now handled the same way as in zope.tal.
- DocumentTemplate: ustr no longer mangles MassageIDs. - DocumentTemplate: ustr no longer mangles MassageIDs.
......
...@@ -259,7 +259,11 @@ class ZopeCmd(ZDCmd): ...@@ -259,7 +259,11 @@ class ZopeCmd(ZDCmd):
args.insert(0, self.options.python) args.insert(0, self.options.python)
print 'Running tests via: %s' % ' '.join(args) print 'Running tests via: %s' % ' '.join(args)
pid = os.fork()
if pid == 0: # child
os.execv(self.options.python, args) os.execv(self.options.python, args)
else:
os.waitpid(pid, 0)
def help_test(self): def help_test(self):
print "test [args]+ -- run unit / functional tests." print "test [args]+ -- run unit / functional tests."
......
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