Skip to content

Commit

Permalink
only run postinstall tests for updated modules
Browse files Browse the repository at this point in the history
closes odoo#9768
  • Loading branch information
gurneyalex committed Mar 17, 2016
1 parent 7b7f3fa commit ba7554d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openerp/modules/loading.py
Expand Up @@ -453,7 +453,10 @@ def load_modules(db, force_demo=False, status=None, update_module=False):
t0 = time.time()
t0_sql = openerp.sql_db.sql_counter
if openerp.tools.config['test_enable']:
cr.execute("SELECT name FROM ir_module_module WHERE state='installed'")
if update_module:
cr.execute("SELECT name FROM ir_module_module WHERE state='installed' and name in %s", (tuple(mods),))
else:
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))
_logger.log(25, "All post-tested in %.2fs, %s queries", time.time() - t0, openerp.sql_db.sql_counter - t0_sql)
Expand Down

0 comments on commit ba7554d

Please sign in to comment.