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 print 'Parsing sdk_files.list failed:\n\n', 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 print 'SDK verification failed:\n\n', e | |
767 print 'Add/remove files from %s to fix.\n' % file_list_rel | |
768 print 'Run:' | |
769 print ' ./%s %s %s' % (verify_filelist_py, file_list_rel, pepperdir_rel) | |
770 print 'to test.' | |
Sam Clegg
2013/06/03 19:31:44
Don't you need to actually error out here in both
| |
757 | 771 |
758 | 772 |
759 def BuildStepTarBundle(pepper_ver, tarfile): | 773 def BuildStepTarBundle(pepper_ver, tarfile): |
760 buildbot_common.BuildStep('Tar Pepper Bundle') | 774 buildbot_common.BuildStep('Tar Pepper Bundle') |
761 buildbot_common.MakeDir(os.path.dirname(tarfile)) | 775 buildbot_common.MakeDir(os.path.dirname(tarfile)) |
762 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, | 776 buildbot_common.Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, |
763 'pepper_' + pepper_ver], cwd=NACL_DIR) | 777 'pepper_' + pepper_ver], cwd=NACL_DIR) |
764 | 778 |
765 | 779 |
766 | 780 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
974 BuildStepArchiveSDKTools() | 988 BuildStepArchiveSDKTools() |
975 | 989 |
976 return 0 | 990 return 0 |
977 | 991 |
978 | 992 |
979 if __name__ == '__main__': | 993 if __name__ == '__main__': |
980 try: | 994 try: |
981 sys.exit(main(sys.argv)) | 995 sys.exit(main(sys.argv)) |
982 except KeyboardInterrupt: | 996 except KeyboardInterrupt: |
983 buildbot_common.ErrorExit('build_sdk: interrupted') | 997 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |