| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 run([GSUTIL, 'setacl', 'public-read', uri]) | 76 run([GSUTIL, 'setacl', 'public-read', uri]) |
| 77 | 77 |
| 78 with bot.BuildStep('prepare checked_tests'): | 78 with bot.BuildStep('prepare checked_tests'): |
| 79 uri = "%s/%s" % (GCS_BUCKET, checked_recording) | 79 uri = "%s/%s" % (GCS_BUCKET, checked_recording) |
| 80 run(test_args + ['--mode=' + mode, '--arch=' + arch, '--checked', | 80 run(test_args + ['--mode=' + mode, '--arch=' + arch, '--checked', |
| 81 '--record_to_file=' + checked_recording]) | 81 '--record_to_file=' + checked_recording]) |
| 82 run([GSUTIL, 'cp', checked_recording, uri]) | 82 run([GSUTIL, 'cp', checked_recording, uri]) |
| 83 run([GSUTIL, 'setacl', 'public-read', uri]) | 83 run([GSUTIL, 'setacl', 'public-read', uri]) |
| 84 elif num_run == 2: | 84 elif num_run == 2: |
| 85 with bot.BuildStep('tests'): | 85 with bot.BuildStep('tests'): |
| 86 uri = "%s/%s" % (GCS_BUCKET, recording) | 86 uri = "%s/%s" % (GCS_BUCKET, recording_out) |
| 87 run([GSUTIL, 'cp', uri, recording]) | 87 run([GSUTIL, 'cp', uri, recording_out]) |
| 88 run(test_args + ['--mode=' + mode, '--arch=' + arch, | 88 run(test_args + ['--mode=' + mode, '--arch=' + arch, |
| 89 '--replay_from_file=' + recording_out]) | 89 '--replay_from_file=' + recording_out]) |
| 90 | 90 |
| 91 with bot.BuildStep('checked_tests'): | 91 with bot.BuildStep('checked_tests'): |
| 92 uri = "%s/%s" % (GCS_BUCKET, checked_recording) | 92 uri = "%s/%s" % (GCS_BUCKET, checked_recording_out) |
| 93 run([GSUTIL, 'cp', uri, checked_recording]) | 93 run([GSUTIL, 'cp', uri, checked_recording_out]) |
| 94 run(test_args + ['--mode=' + mode, '--arch=' + arch, '--checked', | 94 run(test_args + ['--mode=' + mode, '--arch=' + arch, '--checked', |
| 95 '--replay_from_file=' + checked_recording_out]) | 95 '--replay_from_file=' + checked_recording_out]) |
| 96 else: | 96 else: |
| 97 raise Exception("Invalid annotated steps run") | 97 raise Exception("Invalid annotated steps run") |
| 98 finally: | 98 finally: |
| 99 for path in temporary_files: | 99 for path in temporary_files: |
| 100 if os.path.exists(path): | 100 if os.path.exists(path): |
| 101 os.remove(path) | 101 os.remove(path) |
| 102 | 102 |
| 103 def target_builder(arch, mode): | 103 def target_builder(arch, mode): |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 sys.exit(main()) | 159 sys.exit(main()) |
| OLD | NEW |