Commit 5488cb69 authored by Jérome Perrin's avatar Jérome Perrin

runTestSuite: propagate --log_directory to runUnitTest

Each runUnitTest will use a subdirectory in the log directory used by
runTestSuite.
parent c54c3331
...@@ -20,7 +20,13 @@ class ERP5TypeTestSuite(TestSuite): ...@@ -20,7 +20,13 @@ class ERP5TypeTestSuite(TestSuite):
def runUnitTest(self, *args, **kw): def runUnitTest(self, *args, **kw):
if self.instance: if self.instance:
args = ('--instance_home=unit_test.%u' % self.instance,) + args instance_home = 'unit_test.%u' % self.instance
args = ('--instance_home', instance_home,) + args
if self.log_directory:
log_directory = os.path.join(self.log_directory, self.instance)
os.mkdir(log_directory)
args = ('--log_directory', log_directory, ) + args
if self.__dict__.has_key("bt5_path"): if self.__dict__.has_key("bt5_path"):
args = ("--bt5_path=%s" % self.bt5_path,) + args args = ("--bt5_path=%s" % self.bt5_path,) + args
instance_number = self.instance or 1 instance_number = self.instance or 1
......
...@@ -103,6 +103,7 @@ def main(): ...@@ -103,6 +103,7 @@ def main():
default=None) default=None)
testnode_group.add_argument("--xvfb_bin", default=None) testnode_group.add_argument("--xvfb_bin", default=None)
testnode_group.add_argument("--firefox_bin", default=None) testnode_group.add_argument("--firefox_bin", default=None)
testnode_group.add_argument("--log_directory", default=None)
args = parser.parse_args() args = parser.parse_args()
if args.bt5_path is not None: if args.bt5_path is not None:
...@@ -132,7 +133,8 @@ def main(): ...@@ -132,7 +133,8 @@ def main():
zserver_frontend_url_list=args.zserver_frontend_url_list, zserver_frontend_url_list=args.zserver_frontend_url_list,
bt5_path=args.bt5_path, bt5_path=args.bt5_path,
firefox_bin=args.firefox_bin, firefox_bin=args.firefox_bin,
xvfb_bin=args.xvfb_bin) xvfb_bin=args.xvfb_bin,
log_directory=args.log_directory)
test_result = master.createTestResult(revision, suite.getTestList(), test_result = master.createTestResult(revision, suite.getTestList(),
args.test_node_title, suite.allow_restart, test_suite_title, args.test_node_title, suite.allow_restart, test_suite_title,
args.project_title) args.project_title)
......
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