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

Side by Side Diff: bin/cbuildbot.py

Issue 6135002: Add simple update test to pfq. (Closed) Base URL: http://git.chromium.org/git/crosutils.git@master
Patch Set: Created 9 years, 11 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_config.py » ('j') | image_to_live.sh » ('J')
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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 shutil.rmtree(results_dir_in_chroot) 408 shutil.rmtree(results_dir_in_chroot)
409 409
410 cwd = os.path.join(buildroot, 'src', 'scripts') 410 cwd = os.path.join(buildroot, 'src', 'scripts')
411 RunCommand(['bin/cros_run_vm_test', 411 RunCommand(['bin/cros_run_vm_test',
412 '--no_graphics', 412 '--no_graphics',
413 '--results_dir_root=%s' % results_dir, 413 '--results_dir_root=%s' % results_dir,
414 'suite_Smoke', 414 'suite_Smoke',
415 ], cwd=cwd, error_ok=False) 415 ], cwd=cwd, error_ok=False)
416 416
417 417
418 def _RunAUTest(buildroot):
419 """Runs a basic update test from the au test harness."""
420 cwd = os.path.join(buildroot, 'src', 'scripts')
421 image_path = os.path.join(buildroot, 'src', 'build', 'images', board,
422 'latest', 'chromiumos_test_image.bin')
423 RunCommand(['bin/cros_run_au_test_harness',
424 '--no_graphics',
425 '--no_delta',
426 '--test_prefix=SimpleTest',
427 '--verbose',
428 '--base_image=%s' % image_path,
petkov 2011/01/07 01:10:42 SimpleTest hardcodes target_image as the source im
sosa 2011/01/07 22:10:02 Changed test to just use base_image to target_imag
429 '--target_image=%s' % image_path,
petkov 2011/01/07 01:10:42 does anybody check that the device really updated
sosa 2011/01/07 22:10:02 image_to_live does the following. 1) Verifies th
430 ], cwd=cwd, error_ok=False)
431
432
418 def _UprevPackages(buildroot, tracking_branch, revisionfile, board, overlays): 433 def _UprevPackages(buildroot, tracking_branch, revisionfile, board, overlays):
419 """Uprevs a package based on given revisionfile. 434 """Uprevs a package based on given revisionfile.
420 435
421 If revisionfile is set to None or does not resolve to an actual file, this 436 If revisionfile is set to None or does not resolve to an actual file, this
422 function will uprev all packages. 437 function will uprev all packages.
423 438
424 Keyword arguments: 439 Keyword arguments:
425 revisionfile -- string specifying a file that contains a list of revisions to 440 revisionfile -- string specifying a file that contains a list of revisions to
426 uprev. 441 uprev.
427 """ 442 """
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 buildconfig['board'], rev_overlays) 703 buildconfig['board'], rev_overlays)
689 704
690 _EnableLocalAccount(buildroot) 705 _EnableLocalAccount(buildroot)
691 _Build(buildroot, emptytree) 706 _Build(buildroot, emptytree)
692 707
693 if buildconfig['unittests'] and options.tests: 708 if buildconfig['unittests'] and options.tests:
694 _RunUnitTests(buildroot) 709 _RunUnitTests(buildroot)
695 710
696 _BuildImage(buildroot) 711 _BuildImage(buildroot)
697 712
698 if buildconfig['smoke_bvt'] and options.tests: 713 if buildconfig['tests'] and options.tests:
699 _BuildVMImageForTesting(buildroot) 714 _BuildVMImageForTesting(buildroot)
700 test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber 715 test_results_dir = '/tmp/run_remote_tests.%s' % options.buildnumber
701 try: 716 try:
702 _RunSmokeSuite(buildroot, test_results_dir) 717 _RunSmokeSuite(buildroot, test_results_dir)
718 _RunAUTest(buildroot)
703 finally: 719 finally:
704 if not options.debug: 720 if not options.debug:
705 archive_full_path = os.path.join(options.gsutil_archive, 721 archive_full_path = os.path.join(options.gsutil_archive,
706 str(options.buildnumber)) 722 str(options.buildnumber))
707 _ArchiveTestResults(buildroot, buildconfig['board'], 723 _ArchiveTestResults(buildroot, buildconfig['board'],
708 test_results_dir=test_results_dir, 724 test_results_dir=test_results_dir,
709 gsutil=options.gsutil, 725 gsutil=options.gsutil,
710 archive_dir=archive_full_path, 726 archive_dir=archive_full_path,
711 acl=options.acl) 727 acl=options.acl)
712 728
713 if buildconfig['uprev']: 729 if buildconfig['uprev']:
714 # Don't push changes for developers. 730 # Don't push changes for developers.
715 if buildconfig['master']: 731 if buildconfig['master']:
716 # Master bot needs to check if the other slaves completed. 732 # Master bot needs to check if the other slaves completed.
(...skipping 14 matching lines...) Expand all
731 except: 747 except:
732 # Send failure to master bot. 748 # Send failure to master bot.
733 if not buildconfig['master'] and buildconfig['important']: 749 if not buildconfig['master'] and buildconfig['important']:
734 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) 750 cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED)
735 751
736 raise 752 raise
737 753
738 754
739 if __name__ == '__main__': 755 if __name__ == '__main__':
740 main() 756 main()
OLDNEW
« no previous file with comments | « no previous file | bin/cbuildbot_config.py » ('j') | image_to_live.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698