From bd1607643136127f3d584e01273aa46468430776 Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Sun, 9 Feb 2014 03:25:20 +0100 Subject: [PATCH] fix try to fix runbot oe command bzr revid: al@openerp.com-20140209022520-p55nlctjru58ans5 --- openerp/modules/module.py | 20 ++------------------ openerpcommand/initialize.py | 4 ++++ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/openerp/modules/module.py b/openerp/modules/module.py index e3b8e10cc97..c8ee72f42db 100644 --- a/openerp/modules/module.py +++ b/openerp/modules/module.py @@ -323,24 +323,8 @@ def adapt_version(version): return version def get_test_modules(module): - """ Return a list of module for the addons potentialy containing tests to - feed unittest2.TestLoader.loadTestsFromModule() """ - # Try to import the module - module = 'openerp.addons.' + module + '.tests' - try: - m = __import__(module) - except Exception, e: - # If module has no `tests` sub-module, no problem. - if str(e) != 'No module named tests': - _logger.exception('Can not `import %s`.', module) - return [] - - # include submodules too - result = [] - for name in sys.modules: - if name.startswith(module) and sys.modules[name]: - result.append(sys.modules[name]) - return result + # backward compatibility for oe + return [] # Use a custom stream object to log the test executions. class TestStream(object): diff --git a/openerpcommand/initialize.py b/openerpcommand/initialize.py index 6261312de7e..3723e9f5c01 100644 --- a/openerpcommand/initialize.py +++ b/openerpcommand/initialize.py @@ -22,6 +22,8 @@ def install_openerp(database_name, create_database_flag, module_names, install_d # Install the import hook, to import openerp.addons.. openerp.modules.module.initialize_sys_path() + print + registry = openerp.modules.registry.RegistryManager.get( database_name, update_module=True, force_demo=install_demo_data) @@ -88,6 +90,8 @@ def run(args): args.addons = [] config['addons_path'] = ','.join(args.addons) + print "MY addons path is", config['addons_path'] + if args.all_modules: module_names = common.get_addons_from_paths(args.addons, args.exclude) elif args.module: