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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 # Add SDK make tools scripts to the python path. | 47 # Add SDK make tools scripts to the python path. |
| 48 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) | 48 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
| 49 sys.path.append(os.path.join(NACL_DIR, 'build')) | 49 sys.path.append(os.path.join(NACL_DIR, 'build')) |
| 50 | 50 |
| 51 import getos | 51 import getos |
| 52 import oshelpers | 52 import oshelpers |
| 53 | 53 |
| 54 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') | 54 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') |
| 55 | 55 |
| 56 NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src' | 56 NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src' |
| 57 NACLPORTS_REV = 850 | 57 NACLPORTS_REV = 954 |
|
binji
2013/10/31 16:34:36
CL comment says 951
Sam Clegg
2013/10/31 16:54:16
Done.
| |
| 58 | 58 |
| 59 GYPBUILD_DIR = 'gypbuild' | 59 GYPBUILD_DIR = 'gypbuild' |
| 60 | 60 |
| 61 options = None | 61 options = None |
| 62 | 62 |
| 63 | 63 |
| 64 def GetGlibcToolchain(): | 64 def GetGlibcToolchain(): |
| 65 tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars') | 65 tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars') |
| 66 tcname = 'toolchain_%s_x86.tar.bz2' % getos.GetPlatform() | 66 tcname = 'toolchain_%s_x86.tar.bz2' % getos.GetPlatform() |
| 67 return os.path.join(tcdir, tcname) | 67 return os.path.join(tcdir, tcname) |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 813 else: | 813 else: |
| 814 # sync existing copy to pinned revision. | 814 # sync existing copy to pinned revision. |
| 815 cmd = ['svn', 'update', '-r', str(NACLPORTS_REV)] | 815 cmd = ['svn', 'update', '-r', str(NACLPORTS_REV)] |
| 816 buildbot_common.Run(cmd, cwd=NACLPORTS_DIR) | 816 buildbot_common.Run(cmd, cwd=NACLPORTS_DIR) |
| 817 | 817 |
| 818 | 818 |
| 819 def BuildStepBuildNaClPorts(pepper_ver, pepperdir): | 819 def BuildStepBuildNaClPorts(pepper_ver, pepperdir): |
| 820 """Build selected naclports in all configurations.""" | 820 """Build selected naclports in all configurations.""" |
| 821 # TODO(sbc): currently naclports doesn't know anything about | 821 # TODO(sbc): currently naclports doesn't know anything about |
| 822 # Debug builds so the Debug subfolders are all empty. | 822 # Debug builds so the Debug subfolders are all empty. |
| 823 bundle_dir = os.path.join(NACLPORTS_DIR, 'out', 'sdk_bundle') | |
| 824 | 823 |
| 825 env = dict(os.environ) | 824 env = dict(os.environ) |
| 826 env['NACL_SDK_ROOT'] = pepperdir | 825 env['NACL_SDK_ROOT'] = pepperdir |
| 826 env['PEPPER_DIR'] = os.path.dirname(pepperdir) | |
|
binji
2013/10/31 16:34:36
what is this for? (just curious)
Sam Clegg
2013/10/31 16:54:16
The script we are calling expects this to be set b
| |
| 827 env['NACLPORTS_NO_ANNOTATE'] = "1" | 827 env['NACLPORTS_NO_ANNOTATE'] = "1" |
| 828 env['NACLPORTS_NO_UPLOAD'] = "1" | 828 env['NACLPORTS_NO_UPLOAD'] = "1" |
| 829 | 829 |
| 830 build_script = 'build_tools/bots/linux/naclports-linux-sdk-bundle.sh' | 830 build_script = 'build_tools/bots/linux/naclports-linux-sdk-bundle.sh' |
| 831 buildbot_common.BuildStep('Build naclports') | 831 buildbot_common.BuildStep('Build naclports') |
| 832 buildbot_common.Run([build_script], env=env, cwd=NACLPORTS_DIR) | 832 buildbot_common.Run([build_script], env=env, cwd=NACLPORTS_DIR) |
| 833 | 833 |
| 834 bundle_dir = os.path.join(NACLPORTS_DIR, 'out', 'sdk_bundle') | |
| 834 out_dir = os.path.join(bundle_dir, 'pepper_%s' % pepper_ver) | 835 out_dir = os.path.join(bundle_dir, 'pepper_%s' % pepper_ver) |
| 835 | 836 |
| 836 # Some naclports do not include a standalone LICENSE/COPYING file | 837 # Some naclports do not include a standalone LICENSE/COPYING file |
| 837 # so we explicitly list those here for inclusion. | 838 # so we explicitly list those here for inclusion. |
| 838 extra_licenses = ('tinyxml/readme.txt', | 839 extra_licenses = ('tinyxml/readme.txt', |
| 839 'jpeg-8d/README', | 840 'jpeg-8d/README', |
| 840 'zlib-1.2.3/README') | 841 'zlib-1.2.3/README') |
| 841 src_root = os.path.join(NACLPORTS_DIR, 'out', 'repository-i686') | 842 src_root = os.path.join(NACLPORTS_DIR, 'out', 'repository-i686') |
| 842 output_license = os.path.join(out_dir, 'ports', 'LICENSE') | 843 output_license = os.path.join(out_dir, 'ports', 'LICENSE') |
| 843 GenerateNotice(src_root , output_license, extra_licenses) | 844 GenerateNotice(src_root , output_license, extra_licenses) |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 969 BuildStepArchiveSDKTools() | 970 BuildStepArchiveSDKTools() |
| 970 | 971 |
| 971 return 0 | 972 return 0 |
| 972 | 973 |
| 973 | 974 |
| 974 if __name__ == '__main__': | 975 if __name__ == '__main__': |
| 975 try: | 976 try: |
| 976 sys.exit(main(sys.argv)) | 977 sys.exit(main(sys.argv)) |
| 977 except KeyboardInterrupt: | 978 except KeyboardInterrupt: |
| 978 buildbot_common.ErrorExit('build_sdk: interrupted') | 979 buildbot_common.ErrorExit('build_sdk: interrupted') |
| OLD | NEW |