OLD | NEW |
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
2 | 2 |
3 import argparse | 3 import argparse |
4 import itertools | 4 import itertools |
5 import os | 5 import os |
6 import re | 6 import re |
7 import subprocess | 7 import subprocess |
8 import sys | 8 import sys |
9 import tempfile | 9 import tempfile |
10 | 10 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 if args.expect_fail: | 141 if args.expect_fail: |
142 cmd += [os.path.join(pnacl_bin_path, 'not')] | 142 cmd += [os.path.join(pnacl_bin_path, 'not')] |
143 cmd += [args.pnacl_sz] | 143 cmd += [args.pnacl_sz] |
144 cmd += ['--target', args.target] | 144 cmd += ['--target', args.target] |
145 if args.sandbox: | 145 if args.sandbox: |
146 cmd += ['-sandbox'] | 146 cmd += ['-sandbox'] |
147 if args.insts: | 147 if args.insts: |
148 # If the tests are based on '-verbose inst' output, force | 148 # If the tests are based on '-verbose inst' output, force |
149 # single-threaded translation because dump output does not get | 149 # single-threaded translation because dump output does not get |
150 # reassembled into order. | 150 # reassembled into order. |
151 cmd += ['-verbose', 'inst', '-notranslate', '-threads=0'] | 151 cmd += ['-verbose', 'inst,init', '-notranslate', '-threads=0'] |
152 if not args.llvm_source: | 152 if not args.llvm_source: |
153 cmd += ['--bitcode-format=pnacl'] | 153 cmd += ['--bitcode-format=pnacl'] |
154 if not args.no_local_syms: | 154 if not args.no_local_syms: |
155 cmd += ['--allow-local-symbol-tables'] | 155 cmd += ['--allow-local-symbol-tables'] |
156 if args.llvm or args.llvm_source: | 156 if args.llvm or args.llvm_source: |
157 cmd += ['--build-on-read=0'] | 157 cmd += ['--build-on-read=0'] |
158 else: | 158 else: |
159 cmd += ['--build-on-read=1'] | 159 cmd += ['--build-on-read=1'] |
160 cmd += ['--filetype=' + args.filetype] | 160 cmd += ['--filetype=' + args.filetype] |
161 script_name = os.path.basename(sys.argv[0]) | 161 script_name = os.path.basename(sys.argv[0]) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 [output_file_name]) | 202 [output_file_name]) |
203 | 203 |
204 stdout_result = shellcmd(cmd, echo=args.echo_cmd) | 204 stdout_result = shellcmd(cmd, echo=args.echo_cmd) |
205 if not args.echo_cmd: | 205 if not args.echo_cmd: |
206 sys.stdout.write(stdout_result) | 206 sys.stdout.write(stdout_result) |
207 if asm_temp and not keep_output_file: | 207 if asm_temp and not keep_output_file: |
208 os.remove(output_file_name) | 208 os.remove(output_file_name) |
209 | 209 |
210 if __name__ == '__main__': | 210 if __name__ == '__main__': |
211 main() | 211 main() |
OLD | NEW |