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

Side by Side Diff: build/android/buildbot/bb_utils.py

Issue 15817022: [Android] Refactor bb_host_steps to prepare for downstream usage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address ilevy's 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import json 5 import json
6 import optparse 6 import optparse
7 import os 7 import os
8 import pipes 8 import pipes
9 import subprocess 9 import subprocess
10 import sys 10 import sys
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 help='build properties in JSON format') 69 help='build properties in JSON format')
70 parser.add_option('--factory-properties', action='callback', 70 parser.add_option('--factory-properties', action='callback',
71 callback=ConvertJson, type='string', default={}, 71 callback=ConvertJson, type='string', default={},
72 help='factory properties in JSON format') 72 help='factory properties in JSON format')
73 return parser 73 return parser
74 74
75 75
76 def EncodeProperties(options): 76 def EncodeProperties(options):
77 return ['--factory-properties=%s' % json.dumps(options.factory_properties), 77 return ['--factory-properties=%s' % json.dumps(options.factory_properties),
78 '--build-properties=%s' % json.dumps(options.build_properties)] 78 '--build-properties=%s' % json.dumps(options.build_properties)]
79
80
81 def RunSteps(all_steps, options):
82 steps = []
83 if options.steps:
Isaac (away) 2013/06/12 21:37:35 maybe change to if not options.steps: return a
Siva Chandra 2013/06/13 00:09:56 Done.
84 steps = options.steps.split(',')
85 unknown_steps = set(steps) - set(step for step, _ in all_steps)
86 if unknown_steps:
87 return sys.exit('Unknown steps %s' % list(unknown_steps))
Isaac (away) 2013/06/12 21:37:35 sys.exit does not return
Siva Chandra 2013/06/13 00:09:56 Done.
88
89 for step, cmd in all_steps:
90 if step in steps:
91 cmd(options)
OLDNEW
« build/android/buildbot/bb_host_steps.py ('K') | « 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