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

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

Issue 17114007: [Android] Refactor the buildbot scripts to prepare for downstream usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address second round of comments 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
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/buildbot/bb_utils.py
diff --git a/build/android/buildbot/bb_utils.py b/build/android/buildbot/bb_utils.py
index 74b27923da8a7b910b62e246baaaa12449231bff..7813a163b0a343a2b0a2a0805147763b5034c52a 100644
--- a/build/android/buildbot/bb_utils.py
+++ b/build/android/buildbot/bb_utils.py
@@ -29,7 +29,7 @@ def CommandToString(command):
return ' '.join(map(pipes.quote, command))
-def SpawnCmd(command):
+def SpawnCmd(command, stdout=None):
"""Spawn a process without waiting for termination."""
print '>', CommandToString(command)
sys.stdout.flush()
@@ -39,13 +39,13 @@ def SpawnCmd(command):
def wait():
return 0
return MockPopen()
- return subprocess.Popen(command, cwd=CHROME_SRC)
+ return subprocess.Popen(command, cwd=CHROME_SRC, stdout=stdout)
def RunCmd(command, flunk_on_failure=True, halt_on_failure=False,
- warning_code=88):
+ warning_code=88, stdout=None):
"""Run a command relative to the chrome source root."""
- code = SpawnCmd(command).wait()
+ code = SpawnCmd(command, stdout).wait()
print '<', CommandToString(command)
if code != 0:
print 'ERROR: process exited with code %d' % code
@@ -78,16 +78,12 @@ def EncodeProperties(options):
'--build-properties=%s' % json.dumps(options.build_properties)]
-def RunSteps(all_steps, options):
- if not options.steps:
- return
-
- steps = options.steps.split(',')
- unknown_steps = set(steps) - set(step for step, _ in all_steps)
+def RunSteps(steps, step_cmds, options):
+ unknown_steps = set(steps) - set(step for step, _ in step_cmds)
if unknown_steps:
print >> sys.stderr, 'FATAL: Unknown steps %s' % list(unknown_steps)
sys.exit(1)
- for step, cmd in all_steps:
+ for step, cmd in step_cmds:
if step in steps:
cmd(options)
« no previous file with comments | « build/android/buildbot/bb_run_bot.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698