Commit b345400c authored by Grégory Wisniewski's avatar Grégory Wisniewski

Allow run ZODB tests separately.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1777 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8fd16123
......@@ -63,7 +63,6 @@ UNIT_TEST_MODULES = [
]
FUNC_TEST_MODULES = [
('neo.tests.functional.testZODB', 'check'),
'neo.tests.functional.testMaster',
'neo.tests.functional.testClient',
'neo.tests.functional.testCluster',
......@@ -71,6 +70,10 @@ FUNC_TEST_MODULES = [
'neo.tests.functional.testImportExport',
]
ZODB_TEST_MODULES = [
('neo.tests.zodb.testZODB', 'check'),
]
# configuration
CONSOLE_LOG = False
ATTACH_LOG = False # for ZODB test, only the client side is logged
......@@ -323,6 +326,7 @@ if __name__ == "__main__":
parser = optparse.OptionParser()
parser.add_option('-f', '--functional', action='store_true')
parser.add_option('-u', '--unit', action='store_true')
parser.add_option('-z', '--zodb', action='store_true')
parser.add_option('', '--recipient', action='append')
parser.add_option('', '--sender')
parser.add_option('', '--server')
......@@ -331,7 +335,7 @@ if __name__ == "__main__":
# check arguments
if bool(options.sender) ^ bool(options.recipient):
sys.exit('Need a sender and recipients to mail report')
if not (options.unit or options.functional):
if not (options.unit or options.functional or options.zodb):
sys.exit('Nothing to run, please set -f and/or -u flag')
mail_server = options.server or '127.0.0.1:25'
mail_server = mail_server.split(':')
......@@ -342,6 +346,8 @@ if __name__ == "__main__":
runner.run('Unit tests', UNIT_TEST_MODULES)
if options.functional:
runner.run('Functional tests', FUNC_TEST_MODULES)
if options.zodb:
runner.run('ZODB tests', ZODB_TEST_MODULES)
# build report
runner.build()
......
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