Commit 81f4553a authored by Benjamin Blanc's avatar Benjamin Blanc Committed by Sebastien Robin

Fix bt5_path into ERP5TypeTestCase.py and ERP5TypeTestSuite.py

parent b111682f
......@@ -226,6 +226,13 @@ class ERP5TypeTestCaseMixin(ProcessingNodeTestCase, PortalTestCase):
ZopeTestCase._print('All tests are skipped when --save option is passed '
'with --update_business_templates or without --load')
def shortDescription(self):
description = str(self)
doc = self._testMethodDoc
if doc and doc.split("\n")[0].strip():
description += ', ' + doc.split("\n")[0].strip()
return description
def getRevision(self):
erp5_path = os.path.join(instancehome, 'Products', 'ERP5')
try:
......@@ -726,6 +733,7 @@ class ERP5TypeCommandLineTestCase(ERP5TypeTestCaseMixin):
bt5_path = os.environ.get('erp5_tests_bt5_path')
if bt5_path:
bt5_path_list = bt5_path.split(',')
bt5_path_list += [ os.path.join(path, "*") for path in bt5_path_list ]
else:
bt5_path = os.path.join(instancehome, 'bt5')
bt5_path_list = bt5_path, os.path.join(bt5_path, '*')
......
......@@ -21,6 +21,8 @@ class ERP5TypeTestSuite(TestSuite):
def runUnitTest(self, *args, **kw):
if self.instance:
args = ('--instance_home=unit_test.%u' % self.instance,) + args
if self.__dict__.has_key("bt5_path"):
args = ("--bt5_path=%s" % self.bt5_path,) + args
instance_number = self.instance or 1
mysql_db_list = self.mysql_db_list[
(instance_number-1) * self.mysql_db_count:
......
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