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 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 731 | 731 |
| 732 # Parse environment from "set" command above. | 732 # Parse environment from "set" command above. |
| 733 # It looks like this: | 733 # It looks like this: |
| 734 # KEY1=VALUE1\r\n | 734 # KEY1=VALUE1\r\n |
| 735 # KEY2=VALUE2\r\n | 735 # KEY2=VALUE2\r\n |
| 736 # ... | 736 # ... |
| 737 return dict(line.split('=') for line in stdout.split('\r\n')[:-1]) | 737 return dict(line.split('=') for line in stdout.split('\r\n')[:-1]) |
| 738 | 738 |
| 739 | 739 |
| 740 def BuildStepMakeAll(pepperdir, platform, directory, step_name, | 740 def BuildStepMakeAll(pepperdir, platform, directory, step_name, |
| 741 clean=False, deps=True): | 741 clean=False, deps=True, config='Debug'): |
|
Sam Clegg
2013/01/31 20:09:27
Maybe make this a required (non-default) arg if th
noelallen1
2013/01/31 20:59:24
Those are the only two call sites in this file. P
| |
| 742 buildbot_common.BuildStep(step_name) | 742 buildbot_common.BuildStep(step_name) |
| 743 make_dir = os.path.join(pepperdir, directory) | 743 make_dir = os.path.join(pepperdir, directory) |
| 744 makefile = os.path.join(make_dir, 'Makefile') | 744 makefile = os.path.join(make_dir, 'Makefile') |
| 745 if os.path.isfile(makefile): | 745 if os.path.isfile(makefile): |
| 746 print "\n\nMake: " + make_dir | 746 print "\n\nMake: " + make_dir |
| 747 if platform == 'win': | 747 if platform == 'win': |
| 748 # We need to modify the environment to build host on Windows. | 748 # We need to modify the environment to build host on Windows. |
| 749 env = GetWindowsEnvironment() | 749 env = GetWindowsEnvironment() |
| 750 make = os.path.join(make_dir, 'make.bat') | 750 make = os.path.join(make_dir, 'make.bat') |
| 751 else: | 751 else: |
| 752 env = os.environ | 752 env = os.environ |
| 753 make = 'make' | 753 make = 'make' |
| 754 | 754 |
| 755 extra_args = [] | 755 extra_args = ['CONFIG='+config] |
| 756 if not deps: | 756 if not deps: |
| 757 extra_args += ['IGNORE_DEPS=1'] | 757 extra_args += ['IGNORE_DEPS=1'] |
| 758 | 758 |
| 759 buildbot_common.Run([make, '-j8', 'all_versions'] + extra_args, | 759 buildbot_common.Run([make, '-j8', 'all_versions'] + extra_args, |
| 760 cwd=os.path.abspath(make_dir), env=env) | 760 cwd=os.path.abspath(make_dir), env=env) |
| 761 if clean: | 761 if clean: |
| 762 # Clean to remove temporary files but keep the built libraries. | 762 # Clean to remove temporary files but keep the built libraries. |
| 763 buildbot_common.Run([make, '-j8', 'clean'] + extra_args, | 763 buildbot_common.Run([make, '-j8', 'clean'] + extra_args, |
| 764 cwd=os.path.abspath(make_dir)) | 764 cwd=os.path.abspath(make_dir)) |
| 765 | 765 |
| 766 | 766 |
| 767 def BuildStepBuildLibraries(pepperdir, platform, directory, clean=True): | 767 def BuildStepBuildLibraries(pepperdir, platform, directory, clean=True): |
| 768 BuildStepMakeAll(pepperdir, platform, directory, 'Build Libraries', | 768 BuildStepMakeAll(pepperdir, platform, directory, 'Build Libraries Debug', |
| 769 clean=clean) | 769 clean=clean, config='Debug') |
| 770 BuildStepMakeAll(pepperdir, platform, directory, 'Build Libraries Release', | |
| 771 clean=clean, config='Release') | |
| 770 | 772 |
| 771 | 773 |
| 772 def BuildStepGenerateNotice(pepperdir): | 774 def BuildStepGenerateNotice(pepperdir): |
| 773 # Look for LICENSE files | 775 # Look for LICENSE files |
| 774 license_filenames_re = re.compile('LICENSE|COPYING') | 776 license_filenames_re = re.compile('LICENSE|COPYING') |
| 775 | 777 |
| 776 license_files = [] | 778 license_files = [] |
| 777 for root, _, files in os.walk(pepperdir): | 779 for root, _, files in os.walk(pepperdir): |
| 778 for filename in files: | 780 for filename in files: |
| 779 if license_filenames_re.match(filename): | 781 if license_filenames_re.match(filename): |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1017 BuildStepArchiveBundle('build', pepper_ver, clnumber, tarfile) | 1019 BuildStepArchiveBundle('build', pepper_ver, clnumber, tarfile) |
| 1018 if platform == 'linux': | 1020 if platform == 'linux': |
| 1019 BuildStepArchiveBundle('naclports', pepper_ver, clnumber, ports_tarfile) | 1021 BuildStepArchiveBundle('naclports', pepper_ver, clnumber, ports_tarfile) |
| 1020 BuildStepArchiveSDKTools() | 1022 BuildStepArchiveSDKTools() |
| 1021 | 1023 |
| 1022 return 0 | 1024 return 0 |
| 1023 | 1025 |
| 1024 | 1026 |
| 1025 if __name__ == '__main__': | 1027 if __name__ == '__main__': |
| 1026 sys.exit(main(sys.argv)) | 1028 sys.exit(main(sys.argv)) |
| OLD | NEW |