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

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

Issue 15261003: Add a new script bb_host_steps.py which handles all host side steps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 'Environment setup' is not a step Created 7 years, 6 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
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 c510b097699891c69ace5bc25745063ce03a92a0..dcf247ebfad22d8e6cd6021fa7cd2b5f1003f0f7 100755
--- a/build/android/buildbot/bb_run_bot.py
+++ b/build/android/buildbot/bb_run_bot.py
@@ -13,6 +13,8 @@ import pipes
import subprocess
import sys
+import bb_utils
+
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from pylib import buildbot_report
@@ -22,11 +24,13 @@ CHROME_SRC = os.path.abspath(
GLOBAL_SLAVE_PROPS = {}
BotConfig = collections.namedtuple(
- 'BotConfig', ['bot_id', 'bash_funs', 'test_obj', 'slave_props'])
+ 'BotConfig', ['bot_id', 'host_opts', 'test_obj', 'slave_props'])
TestConfig = collections.namedtuple('Tests', ['tests', 'extra_args'])
Command = collections.namedtuple(
'Command', ['step_name', 'command', 'testing_cmd'])
+CommandToString = bb_utils.CommandToString
+
def GetCommands(options, bot_config):
"""Get a formatted list of commands.
@@ -57,10 +61,13 @@ def GetCommands(options, bot_config):
command])
]
- if bot_config.bash_funs:
- # bash_funs command does not have a testing mode.
- commands.append(
- Command(None, WrapWithBash('; '.join(bot_config.bash_funs)), None))
+ host_opts = bot_config.host_opts
Isaac (away) 2013/06/06 21:26:46 remove variable.
Siva Chandra 2013/06/06 22:10:47 Done.
+ if host_opts:
+ host_cmd = [
+ 'build/android/buildbot/bb_host_steps.py'] + host_opts + property_args
+ commands.append(Command(
+ 'Host steps',
+ WrapWithBash(' '.join(map(pipes.quote, host_cmd))), host_cmd))
test_obj = bot_config.test_obj
if test_obj:
@@ -78,9 +85,10 @@ 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']
+ compile_opt = ['--compile']
+ std_host_tests = ['--host-tests=check_webview_licenses,findbugs']
+ std_build_opts = ['--compile', '--zipbuild']
+ std_test_opts = ['--extract-build']
std_tests = ['ui', 'unit']
flakiness_server = '--upload-to-flakiness-server'
extra_gyp = 'extra_gyp_defines'
@@ -93,39 +101,34 @@ def GetBotStepMap():
bot_configs = [
# Main builders
- B('main-builder-dbg',
- ['bb_check_webview_licenses', 'bb_compile', 'bb_run_findbugs',
- 'bb_zip_build']),
- B('main-builder-rel', ['bb_compile', 'bb_zip_build']),
- B('main-clang-builder', compile_step, slave_props={extra_gyp: 'clang=1'}),
Isaac (away) 2013/06/06 21:26:46 this property got dropped
Siva Chandra 2013/06/06 22:10:47 Done.
- B('main-clobber', compile_step),
- B('main-tests', std_test_steps, T(std_tests, [flakiness_server])),
+ B('main-builder-dbg', std_build_opts + std_host_tests),
+ B('main-builder-rel', std_build_opts),
+ B('main-clang-builder', compile_opt),
+ B('main-clobber', compile_opt),
+ B('main-tests', std_test_opts, T(std_tests, [flakiness_server])),
# Other waterfalls
- B('asan-builder-tests', compile_step + ['bb_asan_tests_setup'],
+ B('asan-builder-tests', compile_opt + ['--asan-tests-setup'],
T(std_tests, ['--asan']), {extra_gyp: 'asan=1'}),
- B('chromedriver-fyi-tests-dbg', std_test_steps,
+ B('chromedriver-fyi-tests-dbg', std_test_opts,
T(['chromedriver'], ['--install=ChromiumTestShell'])),
B('fyi-builder-dbg',
- ['bb_check_webview_licenses', 'bb_compile', 'bb_compile_experimental',
- 'bb_run_findbugs', 'bb_zip_build']),
- B('fyi-builder-rel',
- ['bb_compile', 'bb_compile_experimental', 'bb_zip_build']),
- B('fyi-tests-dbg-ics-gn', ['bb_compile', 'bb_compile_experimental'],
+ std_build_opts + std_host_tests + ['--experimental']),
+ B('fyi-builder-rel', std_build_opts + ['--experimental']),
+ B('fyi-tests-dbg-ics-gn', compile_opt + [ '--experimental'],
T(std_tests, ['--experimental', flakiness_server])),
- B('fyi-tests', std_test_steps,
+ B('fyi-tests', std_test_opts,
T(std_tests, ['--experimental', flakiness_server])),
- B('fyi-component-builder-tests-dbg', compile_step,
- T(std_tests, ['--experimental', flakiness_server]),
- {extra_gyp: 'component=shared_library'}),
Isaac (away) 2013/06/06 21:26:46 this property got dropped
Siva Chandra 2013/06/06 22:10:47 Done.
- B('perf-tests-rel', std_test_steps, T([], ['--install=ContentShell'])),
- B('webkit-latest-webkit-tests', std_test_steps,
+ B('fyi-component-builder-tests-dbg', compile_opt,
+ T(std_tests, ['--experimental', flakiness_server])),
+ B('perf-tests-rel', std_test_opts, T([], ['--install=ContentShell'])),
+ B('webkit-latest-webkit-tests', std_test_opts,
T(['webkit_layout', 'webkit'])),
- B('webkit-latest-contentshell', compile_step, T(['webkit_layout'])),
- B('builder-unit-tests', compile_step, T(['unit'])),
+ B('webkit-latest-contentshell', compile_opt, T(['webkit_layout'])),
+ B('builder-unit-tests', compile_opt, T(['unit'])),
# Generic builder config (for substring match).
- B('builder', std_build_steps),
+ B('builder', std_build_opts),
]
bot_map = dict((config.bot_id, config) for config in bot_configs)
@@ -197,10 +200,6 @@ def main(argv):
print 'Using config:', bot_config
- def CommandToString(command):
- """Returns quoted command that can be run in bash shell."""
- return ' '.join(map(pipes.quote, command))
-
command_objs = GetCommands(options, bot_config)
for command_obj in command_objs:
print 'Will run:', CommandToString(command_obj.command)

Powered by Google App Engine
This is Rietveld 408576698