diff options
| author | Antony Lesuisse <al@openerp.com> | 2014-02-27 17:18:19 +0100 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2014-02-27 17:18:19 +0100 |
| commit | 38d1ca1ff2472f4e1d3bc3d5f3454dc7603374a6 (patch) | |
| tree | 1b2a223afdb1cb27b7d0a19e8bcb7a15ae11219a /openerp/modules/loading.py | |
| parent | 14815d669ff5ae428a74c7b81327667cdbcf44f9 (diff) | |
| parent | 6df317c54629e5c222e8db511b38ada767ec60af (diff) | |
[MERGE] trunk
bzr revid: al@openerp.com-20140227161819-p9chmskfifo0rygs
Diffstat (limited to 'openerp/modules/loading.py')
| -rw-r--r-- | openerp/modules/loading.py | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index 48c5c5adab5..7ca0a6785d6 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -70,6 +70,9 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= cr.commit() else: cr.rollback() + # avoid keeping stale xml_id, etc. in cache + openerp.modules.registry.RegistryManager.clear_caches(cr.dbname) + def _get_files_of_kind(kind): if kind == 'demo': @@ -179,18 +182,12 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= migrations.migrate_module(package, 'post') if has_demo: - # launch tests only in demo mode, as most tests will depend - # on demo data. Other tests can be added into the regular - # 'data' section, but should probably not alter the data, - # as there is no rollback. + # launch tests only in demo mode, allowing tests to use demo data. if tools.config.options['test_enable']: + # Yamel test report.record_result(load_test(module_name, idref, mode)) - - # Run the `fast_suite` and `checks` tests given by the module. - if module_name == 'base': - # Also run the core tests after the database is created. - report.record_result(openerp.modules.module.run_unit_tests('openerp')) - report.record_result(openerp.modules.module.run_unit_tests(module_name)) + # Python tests + report.record_result(openerp.modules.module.run_unit_tests(module_name, cr.dbname)) processed_modules.append(package.name) @@ -244,7 +241,6 @@ def load_marked_modules(cr, graph, states, force, progressdict, report, loaded_m if not processed: break return processed_modules - def load_modules(db, force_demo=False, status=None, update_module=False): # TODO status['progress'] reporting is broken: used twice (and reset each # time to zero) in load_module_graph, not fine-grained enough. |
