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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 # Add SDK make tools scripts to the python path. | 46 # Add SDK make tools scripts to the python path. |
47 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) | 47 sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
48 sys.path.append(os.path.join(NACL_DIR, 'build')) | 48 sys.path.append(os.path.join(NACL_DIR, 'build')) |
49 | 49 |
50 import getos | 50 import getos |
51 import oshelpers | 51 import oshelpers |
52 | 52 |
53 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') | 53 CYGTAR = os.path.join(NACL_DIR, 'build', 'cygtar.py') |
54 | 54 |
55 NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src' | 55 NACLPORTS_URL = 'https://naclports.googlecode.com/svn/trunk/src' |
56 NACLPORTS_REV = 954 | 56 NACLPORTS_REV = 1152 |
57 | 57 |
58 GYPBUILD_DIR = 'gypbuild' | 58 GYPBUILD_DIR = 'gypbuild' |
59 | 59 |
60 options = None | 60 options = None |
61 | 61 |
62 | 62 |
63 def GetGlibcToolchain(): | 63 def GetGlibcToolchain(): |
64 tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars') | 64 tcdir = os.path.join(NACL_DIR, 'toolchain', '.tars') |
65 tcname = 'toolchain_%s_x86.tar.bz2' % getos.GetPlatform() | 65 tcname = 'toolchain_%s_x86.tar.bz2' % getos.GetPlatform() |
66 return os.path.join(tcdir, tcname) | 66 return os.path.join(tcdir, tcname) |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 """Build selected naclports in all configurations.""" | 838 """Build selected naclports in all configurations.""" |
839 # TODO(sbc): currently naclports doesn't know anything about | 839 # TODO(sbc): currently naclports doesn't know anything about |
840 # Debug builds so the Debug subfolders are all empty. | 840 # Debug builds so the Debug subfolders are all empty. |
841 | 841 |
842 env = dict(os.environ) | 842 env = dict(os.environ) |
843 env['NACL_SDK_ROOT'] = pepperdir | 843 env['NACL_SDK_ROOT'] = pepperdir |
844 env['PEPPER_DIR'] = os.path.basename(pepperdir) # pepper_NN | 844 env['PEPPER_DIR'] = os.path.basename(pepperdir) # pepper_NN |
845 env['NACLPORTS_NO_ANNOTATE'] = "1" | 845 env['NACLPORTS_NO_ANNOTATE'] = "1" |
846 env['NACLPORTS_NO_UPLOAD'] = "1" | 846 env['NACLPORTS_NO_UPLOAD'] = "1" |
847 | 847 |
848 build_script = 'build_tools/bots/linux/naclports-linux-sdk-bundle.sh' | 848 build_script = 'build_tools/naclports-linux-sdk-bundle.sh' |
849 buildbot_common.BuildStep('Build naclports') | 849 buildbot_common.BuildStep('Build naclports') |
850 buildbot_common.Run([build_script], env=env, cwd=NACLPORTS_DIR) | 850 buildbot_common.Run([build_script], env=env, cwd=NACLPORTS_DIR) |
851 | 851 |
852 bundle_dir = os.path.join(NACLPORTS_DIR, 'out', 'sdk_bundle') | 852 bundle_dir = os.path.join(NACLPORTS_DIR, 'out', 'sdk_bundle') |
853 out_dir = os.path.join(bundle_dir, 'pepper_%s' % pepper_ver) | 853 out_dir = os.path.join(bundle_dir, 'pepper_%s' % pepper_ver) |
854 | 854 |
855 # Some naclports do not include a standalone LICENSE/COPYING file | 855 # Some naclports do not include a standalone LICENSE/COPYING file |
856 # so we explicitly list those here for inclusion. | 856 # so we explicitly list those here for inclusion. |
857 extra_licenses = ('tinyxml/readme.txt', | 857 extra_licenses = ('tinyxml/readme.txt', |
858 'jpeg-8d/README', | 858 'jpeg-8d/README', |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 BuildStepArchiveSDKTools() | 1004 BuildStepArchiveSDKTools() |
1005 | 1005 |
1006 return 0 | 1006 return 0 |
1007 | 1007 |
1008 | 1008 |
1009 if __name__ == '__main__': | 1009 if __name__ == '__main__': |
1010 try: | 1010 try: |
1011 sys.exit(main(sys.argv)) | 1011 sys.exit(main(sys.argv)) |
1012 except KeyboardInterrupt: | 1012 except KeyboardInterrupt: |
1013 buildbot_common.ErrorExit('build_sdk: interrupted') | 1013 buildbot_common.ErrorExit('build_sdk: interrupted') |
OLD | NEW |