| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 license_files += [os.path.join(fileroot, f) for f in extra_files] | 744 license_files += [os.path.join(fileroot, f) for f in extra_files] |
| 745 print '\n'.join(license_files) | 745 print '\n'.join(license_files) |
| 746 | 746 |
| 747 if not os.path.isabs(output_filename): | 747 if not os.path.isabs(output_filename): |
| 748 output_filename = os.path.join(fileroot, output_filename) | 748 output_filename = os.path.join(fileroot, output_filename) |
| 749 generate_notice.Generate(output_filename, fileroot, license_files) | 749 generate_notice.Generate(output_filename, fileroot, license_files) |
| 750 | 750 |
| 751 | 751 |
| 752 def BuildStepVerifyFilelist(pepperdir, platform): | 752 def BuildStepVerifyFilelist(pepperdir, platform): |
| 753 buildbot_common.BuildStep('Verify SDK Files') | 753 buildbot_common.BuildStep('Verify SDK Files') |
| 754 verify_filelist.Verify(platform, os.path.join(SCRIPT_DIR, 'sdk_files.list'), | 754 file_list_path = os.path.join(SCRIPT_DIR, 'sdk_files.list') |
| 755 pepperdir) | 755 try: |
| 756 print 'OK' | 756 verify_filelist.Verify(platform, file_list_path, pepperdir) |
| 757 print 'OK' |
| 758 except verify_filelist.ParseException, e: |
| 759 buildbot_common.ErrorExit('Parsing sdk_files.list failed:\n\n%s' % e) |
| 760 except verify_filelist.VerifyException, e: |
| 761 file_list_rel = os.path.relpath(file_list_path) |
| 762 verify_filelist_py = os.path.splitext(verify_filelist.__file__)[0] + '.py' |
| 763 verify_filelist_py = os.path.relpath(verify_filelist_py) |
| 764 pepperdir_rel = os.path.relpath(pepperdir) |
| 765 |
| 766 msg = """\ |
| 767 SDK verification failed: |
| 768 |
| 769 %s |
| 770 Add/remove files from %s to fix. |
| 771 |
| 772 Run: |
| 773 ./%s %s %s |
| 774 to test.""" % (e, file_list_rel, verify_filelist_py, file_list_rel, |
| 775 pepperdir_rel) |
| 776 buildbot_common.ErrorExit(msg) |
| 777 |
| 757 | 778 |
| 758 | 779 |
| 759 def BuildStepTarBundle(pepper_ver, tarfile): | 780 def BuildStepTarBundle(pepper_ver, tarfile): |
| 760 buildbot_common.BuildStep('Tar Pepper Bundle') | 781 buildbot_common.BuildStep('Tar Pepper Bundle') |
| 761 buildbot_common.MakeDir(os.path.dirname(tarfile)) | 782 buildbot_common.MakeDir(os.path.dirname(tarfile)) |
| 762 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, | 783 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, |
| 763 'pepper_' + pepper_ver], cwd=NACL_DIR) | 784 'pepper_' + pepper_ver], cwd=NACL_DIR) |
| 764 | 785 |
| 765 | 786 |
| 766 | 787 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 BuildStepArchiveSDKTools() | 995 BuildStepArchiveSDKTools() |
| 975 | 996 |
| 976 return 0 | 997 return 0 |
| 977 | 998 |
| 978 | 999 |
| 979 if __name__ == '__main__': | 1000 if __name__ == '__main__': |
| 980 try: | 1001 try: |
| 981 sys.exit(main(sys.argv)) | 1002 sys.exit(main(sys.argv)) |
| 982 except KeyboardInterrupt: | 1003 except KeyboardInterrupt: |
| 983 buildbot_common.ErrorExit('build_sdk: interrupted') | 1004 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |