From 071720433c81d936bcd27715e1411ab907ba43ab Mon Sep 17 00:00:00 2001 From: Moises Lopez Date: Sun, 20 Jul 2014 23:30:41 -0500 Subject: [PATCH] [REF][runbot] Fix find modules to test and add support to use one previously configured in the repository --- runbot/runbot.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/runbot/runbot.py b/runbot/runbot.py index b4b58de0..fb25b08b 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -587,9 +587,15 @@ class runbot_build(osv.osv): # fallback for addons-only community/project branches if not os.path.isfile(build.server('__init__.py')): - # Find modules to test and store in build - modules_to_test = glob.glob(build.path('*/__openerp__.py')) - build.write({'modules': ','.join(modules_to_test)}) + # Use modules to test previously configured in the repository + modules_to_test = build.repo_id.modules + if not modules_to_test: + # Find modules to test from the folder branch + modules_to_test = ','.join( + os.path.basename(os.path.dirname(a)) + for a in glob.glob(build.path('*/__openerp__.py')) + ) + build.write({'modules': modules_to_test}) for extra_repo in build.repo_id.dependency_ids: closest_name = build.get_closest_branch_name(extra_repo.id) extra_repo.git_export(closest_name, build.path())