Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Unified Diff: build/android/buildbot/bb_run_bot.py

Issue 11823032: Minor enhancements to android buildbot bb_run_bot (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_run_bot.py
diff --git a/build/android/buildbot/bb_run_bot.py b/build/android/buildbot/bb_run_bot.py
index 49421d7c22ef96b59ba41c25c0f8d4e1956e5f72..4fe4d31e4dfbba1dcb4c083063a05868f17a5dd5 100755
--- a/build/android/buildbot/bb_run_bot.py
+++ b/build/android/buildbot/bb_run_bot.py
@@ -66,6 +66,7 @@ def GetCommands(options, bot_config):
def GetBotStepMap():
+ compile_step = ['bb_compile']
std_build_steps = ['bb_compile', 'bb_zip_build']
std_test_steps = ['bb_extract_build', 'bb_reboot_phones']
std_tests = ['ui', 'unit']
@@ -78,9 +79,9 @@ def GetBotStepMap():
# Main builders
B('main-builder-dbg',
['bb_compile', 'bb_run_findbugs', 'bb_zip_build'], None, None),
- B('main-builder-rel', std_build_steps, None, None),
- B('main-clang-builder', ['bb_compile'], None, None),
- B('main-clobber', ['bb_compile'], None, None),
+ B('main-builder-rel', compile_step, None, None),
+ B('main-clang-builder', compile_step, None, None),
+ B('main-clobber', compile_step, None, None),
B('main-tests-dbg', std_test_steps, T(std_tests), None),
# Other waterfalls
@@ -92,13 +93,14 @@ def GetBotStepMap():
B('fyi-builder-rel',
['bb_compile', 'bb_compile_experimental', 'bb_zip_build'], None, None),
B('fyi-tests', std_test_steps, T(std_tests, ['--experimental']), None),
- B('perf-builder-rel', std_build_steps, None, None),
B('perf-tests-rel', std_test_steps, T([], ['--install=ContentShell']),
None),
- B('webkit-latest-builder', std_build_steps, None, None),
B('webkit-latest-tests', std_test_steps, T(['unit']), None),
B('webkit-latest-webkit-tests', std_test_steps,
T(['webkit_layout', 'webkit']), None),
+
+ # Generic builder config (for substring match).
+ B('builder', std_build_steps, None, None),
]
bot_map = dict((config.bot_id, config) for config in bot_configs)
@@ -138,21 +140,22 @@ def main(argv):
if args:
parser.error('Unused args: %s' % args)
- bot_id = options.bot_id or options.factory_properties.get('bot_id')
+ bot_id = options.bot_id or options.factory_properties.get('android_bot_id')
if not bot_id:
parser.error('A bot id must be specified through option or factory_props.')
# Get a BotConfig object looking first for an exact bot-id match. If no exact
# match, look for a bot-id which is a substring of the specified id.
- # This allows similar bots can have unique IDs, but to share config.
+ # This allows similar bots to have unique IDs, but to share config.
+ # If multiple substring matches exist, pick the longest one.
bot_map = GetBotStepMap()
bot_config = bot_map.get(bot_id)
if not bot_config:
- for cur_id, cur_config in bot_map.iteritems():
- if cur_id in bot_id:
- print 'Using config from id="%s" (substring match).' % cur_id
- bot_config = cur_config
- break
+ substring_matches = filter(lambda x: x in bot_id, bot_map.iterkeys())
+ if substring_matches:
+ max_id = max(substring_matches, key=len)
+ print 'Using config from id="%s" (substring match).' % max_id
+ bot_config = bot_map[max_id]
if not bot_config:
print 'Error: config for id="%s" cannot be inferred.' % bot_id
return 1
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698