| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 import bot | 10 import bot |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 build_py = os.path.join('tools', 'build.py') | 35 build_py = os.path.join('tools', 'build.py') |
| 36 revision = int(os.environ['BUILDBOT_GOT_REVISION']) | 36 revision = int(os.environ['BUILDBOT_GOT_REVISION']) |
| 37 tarball = tarball_name(arch, mode, revision) | 37 tarball = tarball_name(arch, mode, revision) |
| 38 temporary_files = [tarball] | 38 temporary_files = [tarball] |
| 39 bot.Clobber() | 39 bot.Clobber() |
| 40 try: | 40 try: |
| 41 num_run = int(os.environ['BUILDBOT_ANNOTATED_STEPS_RUN']) | 41 num_run = int(os.environ['BUILDBOT_ANNOTATED_STEPS_RUN']) |
| 42 if num_run == 1: | 42 if num_run == 1: |
| 43 with bot.BuildStep('Build %s %s' % (arch, mode)): | 43 with bot.BuildStep('Build %s %s' % (arch, mode)): |
| 44 run([sys.executable, build_py, | 44 run([sys.executable, build_py, |
| 45 '-m%s' % mode, '--arch=%s' % arch, 'runtime']) | 45 '-m%s' % mode, '--arch=%s' % arch]) |
| 46 # We need to build 'run_vm_tests.host' as well to enable | |
| 47 # test.py to list the VM tests. | |
| 48 run([sys.executable, build_py, | |
| 49 '-m%s' % mode, '--arch=%s' % arch, 'run_vm_tests.host']) | |
| 50 | 46 |
| 51 with bot.BuildStep('Create build tarball'): | 47 with bot.BuildStep('Create build tarball'): |
| 52 run(['tar', '-cjf', tarball, '--exclude=**/obj', | 48 run(['tar', '-cjf', tarball, '--exclude=**/obj', |
| 53 '--exclude=**/obj.host', '--exclude=**/obj.target', | 49 '--exclude=**/obj.host', '--exclude=**/obj.target', |
| 54 '--exclude=**/*analyzer*', '--exclude=**/run_vm_tests.host', | 50 '--exclude=**/*analyzer*', '--exclude=**/run_vm_tests.host', |
| 55 'out/']) | 51 'out/']) |
| 56 | 52 |
| 57 with bot.BuildStep('Upload build tarball'): | 53 with bot.BuildStep('Upload build tarball'): |
| 58 uri = "%s/%s" % (GCS_BUCKET, tarball) | 54 uri = "%s/%s" % (GCS_BUCKET, tarball) |
| 59 run([GSUTIL, 'cp', tarball, uri]) | 55 run([GSUTIL, 'cp', tarball, uri]) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 mode = target_vm_pattern_match.group(2) | 107 mode = target_vm_pattern_match.group(2) |
| 112 target_builder(arch, mode) | 108 target_builder(arch, mode) |
| 113 else: | 109 else: |
| 114 raise Exception("Unknown builder name %s" % name) | 110 raise Exception("Unknown builder name %s" % name) |
| 115 | 111 |
| 116 if __name__ == '__main__': | 112 if __name__ == '__main__': |
| 117 try: | 113 try: |
| 118 sys.exit(main()) | 114 sys.exit(main()) |
| 119 except OSError as e: | 115 except OSError as e: |
| 120 sys.exit(e.errno) | 116 sys.exit(e.errno) |
| OLD | NEW |