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 29 matching lines...) Expand all Loading... |
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]) | 45 '-m%s' % mode, '--arch=%s' % arch]) |
46 | 46 |
47 with bot.BuildStep('Create build tarball'): | 47 with bot.BuildStep('Create build tarball'): |
48 run(['tar', '-cjf', tarball, '--exclude=**/obj', | 48 run(['tar', '-cjf', tarball, '--exclude=**/obj', |
49 '--exclude=**/obj.host', '--exclude=**/obj.target', | 49 '--exclude=**/obj.host', '--exclude=**/obj.target', |
50 '--exclude=**/*analyzer*', '--exclude=**/run_vm_tests.host', | 50 '--exclude=**/*analyzer*', 'out/']) |
51 'out/']) | |
52 | 51 |
53 with bot.BuildStep('Upload build tarball'): | 52 with bot.BuildStep('Upload build tarball'): |
54 uri = "%s/%s" % (GCS_BUCKET, tarball) | 53 uri = "%s/%s" % (GCS_BUCKET, tarball) |
55 run([GSUTIL, 'cp', tarball, uri]) | 54 run([GSUTIL, 'cp', tarball, uri]) |
56 run([GSUTIL, 'setacl', 'public-read', uri]) | 55 run([GSUTIL, 'setacl', 'public-read', uri]) |
57 | 56 |
58 elif num_run == 2: | 57 elif num_run == 2: |
59 with bot.BuildStep('tests'): | 58 with bot.BuildStep('tests'): |
60 print "Please see the target device for results." | 59 print "Please see the target device for results." |
61 print "We no longer record/replay tests." | 60 print "We no longer record/replay tests." |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 mode = target_vm_pattern_match.group(2) | 106 mode = target_vm_pattern_match.group(2) |
108 target_builder(arch, mode) | 107 target_builder(arch, mode) |
109 else: | 108 else: |
110 raise Exception("Unknown builder name %s" % name) | 109 raise Exception("Unknown builder name %s" % name) |
111 | 110 |
112 if __name__ == '__main__': | 111 if __name__ == '__main__': |
113 try: | 112 try: |
114 sys.exit(main()) | 113 sys.exit(main()) |
115 except OSError as e: | 114 except OSError as e: |
116 sys.exit(e.errno) | 115 sys.exit(e.errno) |
OLD | NEW |