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

Side by Side Diff: bin/cbuildbot.py

Issue 5973003: Remove explicit call to build. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 10 years 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 """Wrapper around build_packages.""" 360 """Wrapper around build_packages."""
361 cwd = os.path.join(buildroot, 'src', 'scripts') 361 cwd = os.path.join(buildroot, 'src', 'scripts')
362 if emptytree: 362 if emptytree:
363 cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages'] 363 cmd = ['sh', '-c', 'EXTRA_BOARD_FLAGS=--emptytree ./build_packages']
364 else: 364 else:
365 cmd = ['./build_packages'] 365 cmd = ['./build_packages']
366 366
367 RunCommand(cmd, cwd=cwd, enter_chroot=True) 367 RunCommand(cmd, cwd=cwd, enter_chroot=True)
368 368
369 369
370 def _BuildChrome(buildroot, board, chrome_atom_to_build):
371 """Wrapper for emerge call to build Chrome."""
372 cwd = os.path.join(buildroot, 'src', 'scripts')
373 RunCommand(['emerge-%s' % board,
374 '=%s' % chrome_atom_to_build],
375 cwd=cwd, enter_chroot=True)
376
377
378 def _EnableLocalAccount(buildroot): 370 def _EnableLocalAccount(buildroot):
379 cwd = os.path.join(buildroot, 'src', 'scripts') 371 cwd = os.path.join(buildroot, 'src', 'scripts')
380 # Set local account for test images. 372 # Set local account for test images.
381 RunCommand(['./enable_localaccount.sh', 373 RunCommand(['./enable_localaccount.sh',
382 'chronos'], 374 'chronos'],
383 print_cmd=False, cwd=cwd) 375 print_cmd=False, cwd=cwd)
384 376
385 377
386 def _BuildImage(buildroot): 378 def _BuildImage(buildroot):
387 _WipeOldOutput(buildroot) 379 _WipeOldOutput(buildroot)
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 685
694 elif buildconfig['uprev']: 686 elif buildconfig['uprev']:
695 _UprevPackages(buildroot, tracking_branch, revisionfile, 687 _UprevPackages(buildroot, tracking_branch, revisionfile,
696 buildconfig['board'], rev_overlays) 688 buildconfig['board'], rev_overlays)
697 689
698 _EnableLocalAccount(buildroot) 690 _EnableLocalAccount(buildroot)
699 # Doesn't rebuild without acquiring more source. 691 # Doesn't rebuild without acquiring more source.
700 if options.sync: 692 if options.sync:
701 _Build(buildroot, emptytree) 693 _Build(buildroot, emptytree)
702 694
703 if chrome_atom_to_build:
704 _BuildChrome(buildroot, buildconfig['board'], chrome_atom_to_build)
705
706 if buildconfig['unittests'] and options.tests: 695 if buildconfig['unittests'] and options.tests:
707 _RunUnitTests(buildroot) 696 _RunUnitTests(buildroot)
708 697
709 _BuildImage(buildroot) 698 _BuildImage(buildroot)
710 699
711 if buildconfig['smoke_bvt'] and options.tests: 700 if buildconfig['smoke_bvt'] and options.tests:
712 _BuildVMImageForTesting(buildroot) 701 _BuildVMImageForTesting(buildroot)
713 test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber 702 test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber
714 try: 703 try:
715 _RunSmokeSuite(buildroot, test_results_dir) 704 _RunSmokeSuite(buildroot, test_results_dir)
(...skipping 28 matching lines...) Expand all
744 except: 733 except:
745 # Send failure to master bot. 734 # Send failure to master bot.
746 if not buildconfig['master'] and buildconfig['important']: 735 if not buildconfig['master'] and buildconfig['important']:
747 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) 736 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
748 737
749 raise 738 raise
750 739
751 740
752 if __name__ == '__main__': 741 if __name__ == '__main__':
753 main() 742 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