| 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 shutil | 8 import shutil |
| 9 import sys | 9 import sys |
| 10 | 10 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 run(['python', execute_testcases_py, recording, recording_out]) | 125 run(['python', execute_testcases_py, recording, recording_out]) |
| 126 run([GSUTIL, 'cp', recording_out, uri_out]) | 126 run([GSUTIL, 'cp', recording_out, uri_out]) |
| 127 run([GSUTIL, 'setacl', 'public-read', uri_out]) | 127 run([GSUTIL, 'setacl', 'public-read', uri_out]) |
| 128 | 128 |
| 129 with bot.BuildStep('execute checked_tests'): | 129 with bot.BuildStep('execute checked_tests'): |
| 130 uri = "%s/%s" % (GCS_BUCKET, checked_recording) | 130 uri = "%s/%s" % (GCS_BUCKET, checked_recording) |
| 131 uri_out = "%s/%s" % (GCS_BUCKET, checked_recording_out) | 131 uri_out = "%s/%s" % (GCS_BUCKET, checked_recording_out) |
| 132 run([GSUTIL, 'cp', uri, checked_recording]) | 132 run([GSUTIL, 'cp', uri, checked_recording]) |
| 133 run(['python', execute_testcases_py, checked_recording, | 133 run(['python', execute_testcases_py, checked_recording, |
| 134 checked_recording_out]) | 134 checked_recording_out]) |
| 135 run([GSUTIL, 'cp', recording_out, uri_out]) | 135 run([GSUTIL, 'cp', checked_recording_out, uri_out]) |
| 136 run([GSUTIL, 'setacl', 'public-read', uri_out]) | 136 run([GSUTIL, 'setacl', 'public-read', uri_out]) |
| 137 finally: | 137 finally: |
| 138 for path in temporary_files: | 138 for path in temporary_files: |
| 139 if os.path.exists(path): | 139 if os.path.exists(path): |
| 140 os.remove(path) | 140 os.remove(path) |
| 141 | 141 |
| 142 def main(): | 142 def main(): |
| 143 name, is_buildbot = bot.GetBotName() | 143 name, is_buildbot = bot.GetBotName() |
| 144 | 144 |
| 145 cross_vm_pattern_match = re.match(CROSS_VM, name) | 145 cross_vm_pattern_match = re.match(CROSS_VM, name) |
| 146 target_vm_pattern_match = re.match(TARGET_VM, name) | 146 target_vm_pattern_match = re.match(TARGET_VM, name) |
| 147 if cross_vm_pattern_match: | 147 if cross_vm_pattern_match: |
| 148 arch = cross_vm_pattern_match.group(1) | 148 arch = cross_vm_pattern_match.group(1) |
| 149 mode = cross_vm_pattern_match.group(2) | 149 mode = cross_vm_pattern_match.group(2) |
| 150 cross_compiling_builder(arch, mode) | 150 cross_compiling_builder(arch, mode) |
| 151 elif target_vm_pattern_match: | 151 elif target_vm_pattern_match: |
| 152 arch = target_vm_pattern_match.group(1) | 152 arch = target_vm_pattern_match.group(1) |
| 153 mode = target_vm_pattern_match.group(2) | 153 mode = target_vm_pattern_match.group(2) |
| 154 target_builder(arch, mode) | 154 target_builder(arch, mode) |
| 155 else: | 155 else: |
| 156 raise Exception("Unknown builder name %s" % name) | 156 raise Exception("Unknown builder name %s" % name) |
| 157 | 157 |
| 158 if __name__ == '__main__': | 158 if __name__ == '__main__': |
| 159 try: | 159 try: |
| 160 sys.exit(main()) | 160 sys.exit(main()) |
| 161 except OSError as e: | 161 except OSError as e: |
| 162 sys.exit(e.errno) | 162 sys.exit(e.errno) |
| OLD | NEW |