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

Side by Side Diff: bin/cbuildbot.py

Issue 3798003: Robustify and speed up cros_mark_all_as_stable. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Check no changes Created 10 years, 2 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
« no previous file with comments | « no previous file | bin/cbuildbot_unittest.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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """CBuildbot is wrapper around the build process used by the pre-flight queue""" 7 """CBuildbot is wrapper around the build process used by the pre-flight queue"""
8 8
9 import errno 9 import errno
10 import re 10 import re
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 return revisions.items() 177 return revisions.items()
178 178
179 179
180 def _UprevFromRevisionList(buildroot, revision_list): 180 def _UprevFromRevisionList(buildroot, revision_list):
181 """Uprevs based on revision list.""" 181 """Uprevs based on revision list."""
182 if not revision_list: 182 if not revision_list:
183 Info('No packages found to uprev') 183 Info('No packages found to uprev')
184 return 184 return
185 185
186 package_str = '' 186 package_str = ''
187 commit_str = ''
188 for package, revision in revision_list: 187 for package, revision in revision_list:
189 package_str += package + ' ' 188 package_str += package + ' '
190 commit_str += revision + ' '
191 189
192 package_str = package_str.strip() 190 package_str = package_str.strip()
193 commit_str = commit_str.strip()
194 191
195 cwd = os.path.join(buildroot, 'src', 'scripts') 192 cwd = os.path.join(buildroot, 'src', 'scripts')
196 RunCommand(['./cros_mark_as_stable', 193 RunCommand(['./cros_mark_as_stable',
197 '--tracking_branch="cros/master"', 194 '--tracking_branch="cros/master"',
198 '--packages="%s"' % package_str, 195 '--packages="%s"' % package_str,
199 '--commit_ids="%s"' % commit_str,
200 'commit'], 196 'commit'],
201 cwd=cwd, enter_chroot=True) 197 cwd=cwd, enter_chroot=True)
202 198
203 199
204 def _UprevAllPackages(buildroot): 200 def _UprevAllPackages(buildroot):
205 """Uprevs all packages that have been updated since last uprev.""" 201 """Uprevs all packages that have been updated since last uprev."""
206 cwd = os.path.join(buildroot, 'src', 'scripts') 202 cwd = os.path.join(buildroot, 'src', 'scripts')
207 RunCommand(['./cros_mark_all_as_stable', 203 RunCommand(['./cros_mark_as_stable', '--all',
208 '--tracking_branch="cros/master"'], 204 '--tracking_branch="cros/master"', 'commit'],
209 cwd=cwd, enter_chroot=True) 205 cwd=cwd, enter_chroot=True)
210 206
211 207
212 def _GetVMConstants(buildroot): 208 def _GetVMConstants(buildroot):
213 """Returns minimum (vdisk_size, statefulfs_size) recommended for VM's.""" 209 """Returns minimum (vdisk_size, statefulfs_size) recommended for VM's."""
214 cwd = os.path.join(buildroot, 'src', 'scripts', 'lib') 210 cwd = os.path.join(buildroot, 'src', 'scripts', 'lib')
215 source_cmd = 'source %s/cros_vm_constants.sh' % cwd 211 source_cmd = 'source %s/cros_vm_constants.sh' % cwd
216 vdisk_size = RunCommand([ 212 vdisk_size = RunCommand([
217 '/bin/bash', '-c', '%s && echo $MIN_VDISK_SIZE_FULL' % source_cmd], 213 '/bin/bash', '-c', '%s && echo $MIN_VDISK_SIZE_FULL' % source_cmd],
218 redirect_stdout=True) 214 redirect_stdout=True)
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 except: 459 except:
464 # Send failure to master bot. 460 # Send failure to master bot.
465 if not buildconfig['master'] and buildconfig['important']: 461 if not buildconfig['master'] and buildconfig['important']:
466 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) 462 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
467 463
468 raise 464 raise
469 465
470 466
471 if __name__ == '__main__': 467 if __name__ == '__main__':
472 main() 468 main()
OLDNEW
« no previous file with comments | « no previous file | bin/cbuildbot_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698