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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 if os.path.isfile(makefile): | 677 if os.path.isfile(makefile): |
678 print "\n\nMake: " + dirnode | 678 print "\n\nMake: " + dirnode |
679 buildbot_common.Run(['make', 'all', '-j8'], | 679 buildbot_common.Run(['make', 'all', '-j8'], |
680 cwd=os.path.abspath(dirnode), shell=True) | 680 cwd=os.path.abspath(dirnode), shell=True) |
681 | 681 |
682 # Archive on non-trybots. | 682 # Archive on non-trybots. |
683 if options.archive or '-sdk' in os.environ.get('BUILDBOT_BUILDERNAME', ''): | 683 if options.archive or '-sdk' in os.environ.get('BUILDBOT_BUILDERNAME', ''): |
684 buildbot_common.BuildStep('Archive build') | 684 buildbot_common.BuildStep('Archive build') |
685 bucket_path = 'nativeclient-mirror/nacl/nacl_sdk/%s' % \ | 685 bucket_path = 'nativeclient-mirror/nacl/nacl_sdk/%s' % \ |
686 build_utils.ChromeVersion() | 686 build_utils.ChromeVersion() |
687 buildbot_common.Archive(tarname, bucket_path, OUT_DIR) | 687 buildbot_common.Archive(os.path.relpath(tarfile, OUT_DIR), |
| 688 bucket_path, OUT_DIR) |
688 | 689 |
689 # generate "manifest snippet" for this archive. | 690 # generate "manifest snippet" for this archive. |
690 if not skip_test_updater: | 691 if not skip_test_updater: |
691 archive = bundle.GetArchive(manifest_util.GetHostOS()) | 692 archive = bundle.GetArchive(manifest_util.GetHostOS()) |
692 archive.url = 'https://commondatastorage.googleapis.com/' \ | 693 archive.url = 'https://commondatastorage.googleapis.com/' \ |
693 'nativeclient-mirror/nacl/nacl_sdk/%s/%s' % ( | 694 'nativeclient-mirror/nacl/nacl_sdk/%s/%s' % ( |
694 build_utils.ChromeVersion(), tarname) | 695 build_utils.ChromeVersion(), tarname) |
695 manifest_snippet_file = os.path.join(OUT_DIR, tarname + '.json') | 696 manifest_snippet_file = os.path.join(OUT_DIR, tarname + '.json') |
696 with open(manifest_snippet_file, 'wb') as manifest_snippet_stream: | 697 with open(manifest_snippet_file, 'wb') as manifest_snippet_stream: |
697 manifest_snippet_stream.write(bundle.ToJSON()) | 698 manifest_snippet_stream.write(bundle.ToJSON()) |
698 | 699 |
699 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR, | 700 buildbot_common.Archive(tarname + '.json', bucket_path, OUT_DIR, |
700 step_link=False) | 701 step_link=False) |
701 | 702 |
702 return 0 | 703 return 0 |
703 | 704 |
704 | 705 |
705 if __name__ == '__main__': | 706 if __name__ == '__main__': |
706 sys.exit(main(sys.argv)) | 707 sys.exit(main(sys.argv)) |
OLD | NEW |