@@ -42,6 +42,7 @@ from openerp import SUPERUSER_ID
|
||||
from openerp.tools.translate import _
|
||||
from openerp.modules.module import initialize_sys_path, \
|
||||
load_openerp_module, init_module_models, adapt_version
|
||||
from module import runs_post_install
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
_test_logger = logging.getLogger('openerp.tests')
|
||||
@@ -425,8 +426,13 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
|
||||
for model in registry.models.values():
|
||||
model._register_hook(cr)
|
||||
|
||||
# STEP 9: Run the post-install tests
|
||||
cr.commit()
|
||||
if openerp.tools.config['test_enable']:
|
||||
cr.execute("SELECT name FROM ir_module_module WHERE state='installed'")
|
||||
for module_name in cr.fetchall():
|
||||
report.record_result(openerp.modules.module.run_unit_tests(module_name[0], cr.dbname, position=runs_post_install))
|
||||
finally:
|
||||
cr.close()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Reference in New Issue
Block a user