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

Side by Side Diff: bin/cbuildbot.py

Issue 4742004: Define buildroot properly (reverted) (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Re-upload Created 10 years, 1 month 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 | no next file » | 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 heapq 10 import heapq
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 buildconfig = config[config_name] 453 buildconfig = config[config_name]
454 454
455 for key in default.iterkeys(): 455 for key in default.iterkeys():
456 if not buildconfig.has_key(key): 456 if not buildconfig.has_key(key):
457 buildconfig[key] = default[key] 457 buildconfig[key] = default[key]
458 458
459 return buildconfig 459 return buildconfig
460 460
461 461
462 def ResolveOverlays(overlays): 462 def ResolveOverlays(buildroot, overlays):
463 """Return the list of overlays to use for a given buildbot. 463 """Return the list of overlays to use for a given buildbot.
464 464
465 Args: 465 Args:
466 overlays: A string describing which overlays you want. 466 overlays: A string describing which overlays you want.
467 'private': Just the private overlay. 467 'private': Just the private overlay.
468 'public': Just the public overlay. 468 'public': Just the public overlay.
469 'both': Both the public and private overlays. 469 'both': Both the public and private overlays.
470 """ 470 """
471 public_overlay = '%s/src/third_party/chromiumos-overlay' % buildroot 471 public_overlay = '%s/src/third_party/chromiumos-overlay' % buildroot
472 private_overlay = '%s/src/private-overlays/chromeos-overlay' % buildroot 472 private_overlay = '%s/src/private-overlays/chromeos-overlay' % buildroot
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 tracking_branch = options.tracking_branch 514 tracking_branch = options.tracking_branch
515 515
516 if len(args) >= 1: 516 if len(args) >= 1:
517 buildconfig = _GetConfig(args[-1]) 517 buildconfig = _GetConfig(args[-1])
518 else: 518 else:
519 Warning('Missing configuration description') 519 Warning('Missing configuration description')
520 parser.print_usage() 520 parser.print_usage()
521 sys.exit(1) 521 sys.exit(1)
522 522
523 # Calculate list of overlay directories. 523 # Calculate list of overlay directories.
524 overlays = ResolveOverlays(buildconfig['overlays']) 524 overlays = ResolveOverlays(buildroot, buildconfig['overlays'])
525 525
526 try: 526 try:
527 _PreFlightRinse(buildroot, buildconfig['board'], tracking_branch, overlays) 527 _PreFlightRinse(buildroot, buildconfig['board'], tracking_branch, overlays)
528 if options.clobber or not os.path.isdir(buildroot): 528 if options.clobber or not os.path.isdir(buildroot):
529 _FullCheckout(buildroot, tracking_branch, url=options.url) 529 _FullCheckout(buildroot, tracking_branch, url=options.url)
530 else: 530 else:
531 _IncrementalCheckout(buildroot) 531 _IncrementalCheckout(buildroot)
532 532
533 chroot_path = os.path.join(buildroot, 'chroot') 533 chroot_path = os.path.join(buildroot, 'chroot')
534 if not os.path.isdir(chroot_path): 534 if not os.path.isdir(chroot_path):
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 except: 578 except:
579 # Send failure to master bot. 579 # Send failure to master bot.
580 if not buildconfig['master'] and buildconfig['important']: 580 if not buildconfig['master'] and buildconfig['important']:
581 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) 581 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
582 582
583 raise 583 raise
584 584
585 585
586 if __name__ == '__main__': 586 if __name__ == '__main__':
587 main() 587 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698