Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Entry point for both build and try bots | 6 """Entry point for both build and try bots |
| 7 | 7 |
| 8 This script is invoked from XXX, usually without arguments | 8 This script is invoked from XXX, usually without arguments |
| 9 to package an SDK. It automatically determines whether | 9 to package an SDK. It automatically determines whether |
| 10 this SDK is for mac, win, linux. | 10 this SDK is for mac, win, linux. |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 buildbot_common.Archive('sdk_tools.tgz', bucket_path, OUT_DIR, | 686 buildbot_common.Archive('sdk_tools.tgz', bucket_path, OUT_DIR, |
| 687 step_link=False) | 687 step_link=False) |
| 688 | 688 |
| 689 | 689 |
| 690 def main(args): | 690 def main(args): |
| 691 parser = optparse.OptionParser() | 691 parser = optparse.OptionParser() |
| 692 parser.add_option('--pnacl', help='Enable pnacl build.', | 692 parser.add_option('--pnacl', help='Enable pnacl build.', |
| 693 action='store_true', dest='pnacl', default=False) | 693 action='store_true', dest='pnacl', default=False) |
| 694 parser.add_option('--examples', help='Only build the examples.', | 694 parser.add_option('--examples', help='Only build the examples.', |
| 695 action='store_true', dest='only_examples', default=False) | 695 action='store_true', dest='only_examples', default=False) |
| 696 parser.add_option('--libraries', help='Only build the libraries.', | |
|
noelallen1
2012/07/25 20:36:03
note: I think this is fine but considering how li
binji
2012/07/25 21:13:08
Done.
| |
| 697 action='store_true', dest='only_libraries', default=False) | |
| 696 parser.add_option('--update', help='Only build the updater.', | 698 parser.add_option('--update', help='Only build the updater.', |
| 697 action='store_true', dest='only_updater', default=False) | 699 action='store_true', dest='only_updater', default=False) |
| 698 parser.add_option('--test-examples', | 700 parser.add_option('--test-examples', |
| 699 help='Run the pyauto tests for examples.', action='store_true', | 701 help='Run the pyauto tests for examples.', action='store_true', |
| 700 dest='test_examples', default=False) | 702 dest='test_examples', default=False) |
| 701 parser.add_option('--skip-tar', help='Skip generating a tarball.', | 703 parser.add_option('--skip-tar', help='Skip generating a tarball.', |
| 702 action='store_true', dest='skip_tar', default=False) | 704 action='store_true', dest='skip_tar', default=False) |
| 703 parser.add_option('--archive', help='Force the archive step.', | 705 parser.add_option('--archive', help='Force the archive step.', |
| 704 action='store_true', dest='archive', default=False) | 706 action='store_true', dest='archive', default=False) |
| 705 parser.add_option('--release', help='PPAPI release version.', | 707 parser.add_option('--release', help='PPAPI release version.', |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 740 clnumber = build_utils.ChromeRevision() | 742 clnumber = build_utils.ChromeRevision() |
| 741 tarname = 'naclsdk_' + platform + '.tar.bz2' | 743 tarname = 'naclsdk_' + platform + '.tar.bz2' |
| 742 if 'pnacl' in toolchains: | 744 if 'pnacl' in toolchains: |
| 743 tarname = 'p' + tarname | 745 tarname = 'p' + tarname |
| 744 tarfile = os.path.join(SERVER_DIR, tarname) | 746 tarfile = os.path.join(SERVER_DIR, tarname) |
| 745 | 747 |
| 746 if options.release: | 748 if options.release: |
| 747 pepper_ver = options.release | 749 pepper_ver = options.release |
| 748 print 'Building PEPPER %s at %s' % (pepper_ver, clnumber) | 750 print 'Building PEPPER %s at %s' % (pepper_ver, clnumber) |
| 749 | 751 |
| 750 if options.only_examples: | 752 if options.only_examples: |
|
noelallen1
2012/07/25 20:36:03
Should this be a superset of libraries so that we
binji
2012/07/25 21:13:08
Done.
| |
| 751 BuildStepCopyExamples(pepperdir, toolchains) | 753 BuildStepCopyExamples(pepperdir, toolchains) |
| 752 BuildStepBuildExamples(pepperdir, platform) | 754 BuildStepBuildExamples(pepperdir, platform) |
| 753 if options.test_examples: | 755 if options.test_examples: |
| 754 BuildStepTestExamples(pepperdir, platform, pepper_ver) | 756 BuildStepTestExamples(pepperdir, platform, pepper_ver) |
| 757 elif options.only_libraries: | |
| 758 BuildStepCopyExamples(pepperdir, toolchains) | |
| 759 BuildStepBuildLibraries(pepperdir, platform) | |
| 755 elif options.only_updater: | 760 elif options.only_updater: |
| 756 build_updater.BuildUpdater(OUT_DIR) | 761 build_updater.BuildUpdater(OUT_DIR) |
| 757 else: # Build everything. | 762 else: # Build everything. |
| 758 BuildStepBuildToolsTests() | 763 BuildStepBuildToolsTests() |
| 759 | 764 |
| 760 BuildStepDownloadToolchains(platform) | 765 BuildStepDownloadToolchains(platform) |
| 761 BuildStepCleanPepperDirs(pepperdir, pepperdir_old) | 766 BuildStepCleanPepperDirs(pepperdir, pepperdir_old) |
| 762 BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools']) | 767 BuildStepMakePepperDirs(pepperdir, ['include', 'toolchain', 'tools']) |
| 763 BuildStepCopyTextFiles(pepperdir, pepper_ver, clnumber) | 768 BuildStepCopyTextFiles(pepperdir, pepper_ver, clnumber) |
| 764 BuildStepUntarToolchains(pepperdir, platform, arch, toolchains) | 769 BuildStepUntarToolchains(pepperdir, platform, arch, toolchains) |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 784 # Archive on non-trybots. | 789 # Archive on non-trybots. |
| 785 if options.archive or buildbot_common.IsSDKBuilder(): | 790 if options.archive or buildbot_common.IsSDKBuilder(): |
| 786 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) | 791 BuildStepArchiveBundle(pepper_ver, clnumber, tarfile) |
| 787 BuildStepArchiveSDKTools() | 792 BuildStepArchiveSDKTools() |
| 788 | 793 |
| 789 return 0 | 794 return 0 |
| 790 | 795 |
| 791 | 796 |
| 792 if __name__ == '__main__': | 797 if __name__ == '__main__': |
| 793 sys.exit(main(sys.argv)) | 798 sys.exit(main(sys.argv)) |
| OLD | NEW |