Commit 6b323964 authored by Sebastien Robin's avatar Sebastien Robin

redefine list of performance tests and some refactoring

parent 5ff45f02
......@@ -27,6 +27,18 @@ class _ERP5(ERP5TypeTestSuite):
os.symlink(os.path.join('..', 'products', product),
os.path.join('Products', product))
def _getAllTestList(self):
test_list = []
for test_path in glob.glob('%s/product/*/tests/test*.py' % sys.path[0]) + \
glob.glob('%s/bt5/*/TestTemplateItem/test*.py' % sys.path[0]):
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
product = test_path.split(os.sep)[-3]
# don't test 3rd party products
if product in ('PortalTransforms', 'MailTemplates', 'Zelenium'):
continue
test_list.append(test_case)
return test_list
def update(self):
self.checkout('products', 'bt5')
self.enableProducts()
......@@ -36,29 +48,19 @@ class PERF(_ERP5):
allow_restart = True
def getTestList(self):
return ('testPerformance',) * 3
def update(self):
self.checkout('products', 'bt5/erp5_base', 'bt5/erp5_ui_test')
self.enableProducts()
return [x for x in self._getAllTestList() if x.find('Performance')>0]
class ERP5(_ERP5):
mysql_db_count = 3
def getTestList(self):
test_list = []
for test_path in glob.glob('%s/product/*/tests/test*.py' % sys.path[0]) + \
glob.glob('%s/bt5/*/TestTemplateItem/test*.py' % sys.path[0]):
test_case = test_path.split(os.sep)[-1][:-3] # remove .py
product = test_path.split(os.sep)[-3]
# don't test 3rd party products
if product in ('PortalTransforms', 'MailTemplates', 'Zelenium'):
continue
for test_case in self._getAllTestList():
# skip some tests
if test_case.startswith('testLive') or test_case.startswith('testVifib') \
or test_case.startswith('testFunctional') \
or test_case in ('testPerformance', 'testSimulationPerformance1',
'testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
or test_case.find('Performance') > 0 \
or test_case in ('testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
'testERP5eGov', # it is not maintained any more
'testAccounting_l10n_fr_m9'):
continue
......
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