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

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

Issue 1869843002: [Android] Switch chromium.gpu bots to mb. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed Created 4 years, 8 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
« no previous file with comments | « no previous file | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved. 2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import json 7 import json
8 import sys 8 import sys
9 9
10 import bb_utils 10 import bb_utils
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 if not clobber_env: 43 if not clobber_env:
44 print 'Clobbering due to triggered landmines:' 44 print 'Clobbering due to triggered landmines:'
45 with open(landmine_path) as f: 45 with open(landmine_path) as f:
46 print f.read() 46 print f.read()
47 RunCmd(['rm', '-rf', build_path]) 47 RunCmd(['rm', '-rf', build_path])
48 48
49 bb_annotations.PrintNamedStep('runhooks') 49 bb_annotations.PrintNamedStep('runhooks')
50 RunCmd(['gclient', 'runhooks'], halt_on_failure=True) 50 RunCmd(['gclient', 'runhooks'], halt_on_failure=True)
51 51
52 52
53 def GenerateBuildFiles(options):
54 cmd = [SrcPath('tools', 'mb', 'mb.py'),
55 'gen',
56 '-m', options.build_properties['mastername'],
57 '-b', options.build_properties['buildername'],
58 '--goma-dir', bb_utils.GOMA_DIR,
59 '//out/%s' % options.target]
60 bb_annotations.PrintNamedStep('generate_build_files')
61 RunCmd(cmd, halt_on_failure=True)
62
63
53 def Compile(options): 64 def Compile(options):
54 RunHooks(options.target) 65 if options.run_mb:
66 os.environ['GYP_CHROMIUM_NO_ACTION'] = '1'
67 RunHooks(options.target)
68 GenerateBuildFiles(options)
69 else:
70 RunHooks(options.target)
71
55 cmd = [os.path.join(SLAVE_SCRIPTS_DIR, 'compile.py'), 72 cmd = [os.path.join(SLAVE_SCRIPTS_DIR, 'compile.py'),
56 '--build-tool=ninja', 73 '--build-tool=ninja',
57 '--compiler=goma', 74 '--compiler=goma',
58 '--target=%s' % options.target, 75 '--target=%s' % options.target,
59 '--goma-dir=%s' % bb_utils.GOMA_DIR] 76 '--goma-dir=%s' % bb_utils.GOMA_DIR]
60 bb_annotations.PrintNamedStep('compile') 77 bb_annotations.PrintNamedStep('compile')
61 if options.build_targets: 78 if options.build_targets:
62 build_targets = options.build_targets.split(',') 79 build_targets = options.build_targets.split(',')
63 cmd += ['--build-args', ' '.join(build_targets)] 80 cmd += ['--build-args', ' '.join(build_targets)]
64 RunCmd(cmd, halt_on_failure=True, cwd=DIR_BUILD_ROOT) 81 RunCmd(cmd, halt_on_failure=True, cwd=DIR_BUILD_ROOT)
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 def GetHostStepsOptParser(): 121 def GetHostStepsOptParser():
105 parser = bb_utils.GetParser() 122 parser = bb_utils.GetParser()
106 parser.add_option('--steps', help='Comma separated list of host tests.') 123 parser.add_option('--steps', help='Comma separated list of host tests.')
107 parser.add_option('--build-targets', default='', 124 parser.add_option('--build-targets', default='',
108 help='Comma separated list of build targets.') 125 help='Comma separated list of build targets.')
109 parser.add_option('--experimental', action='store_true', 126 parser.add_option('--experimental', action='store_true',
110 help='Indicate whether to compile experimental targets.') 127 help='Indicate whether to compile experimental targets.')
111 parser.add_option('--extra_src', default='', 128 parser.add_option('--extra_src', default='',
112 help='Path to extra source file. If this is supplied, ' 129 help='Path to extra source file. If this is supplied, '
113 'bisect script will use it to override default behavior.') 130 'bisect script will use it to override default behavior.')
131 parser.add_option('--run-mb', action='store_true',
132 help='Use mb to generate build files.')
114 133
115 return parser 134 return parser
116 135
117 136
118 def main(argv): 137 def main(argv):
119 parser = GetHostStepsOptParser() 138 parser = GetHostStepsOptParser()
120 options, args = parser.parse_args(argv[1:]) 139 options, args = parser.parse_args(argv[1:])
121 if args: 140 if args:
122 return sys.exit('Unused args %s' % args) 141 return sys.exit('Unused args %s' % args)
123 142
124 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 143 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
125 setattr(options, 'extra_src', 144 setattr(options, 'extra_src',
126 options.factory_properties.get('extra_src', '')) 145 options.factory_properties.get('extra_src', ''))
127 146
128 if options.steps: 147 if options.steps:
129 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) 148 bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options)
130 149
131 150
132 if __name__ == '__main__': 151 if __name__ == '__main__':
133 sys.exit(main(sys.argv)) 152 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/buildbot/bb_run_bot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698