Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Side by Side Diff: pydir/run-pnacl-sz.py

Issue 1776843002: Allow subzero tests to pass without le32-nacl-objdump. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tests_lit/lit.cfg » ('j') | tests_lit/lit.cfg » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 asm_temp.close() 189 asm_temp.close()
190 output_file_name = asm_temp.name 190 output_file_name = asm_temp.name
191 if args.assemble and args.filetype != 'obj': 191 if args.assemble and args.filetype != 'obj':
192 cmd += (['|', os.path.join(pnacl_bin_path, 'llvm-mc')] + 192 cmd += (['|', os.path.join(pnacl_bin_path, 'llvm-mc')] +
193 TargetAssemblerFlags(args.target, args.sandbox) + 193 TargetAssemblerFlags(args.target, args.sandbox) +
194 ['-filetype=obj', '-o', output_file_name]) 194 ['-filetype=obj', '-o', output_file_name])
195 elif output_file_name: 195 elif output_file_name:
196 cmd += ['-o', output_file_name] 196 cmd += ['-o', output_file_name]
197 if args.disassemble: 197 if args.disassemble:
198 # Show wide instruction encodings, diassemble, and show relocs. 198 # Show wide instruction encodings, diassemble, and show relocs.
199 cmd += (['&&', os.path.join(pnacl_bin_path, 'le32-nacl-objdump')] + 199 cmd += (['&&', os.path.join(pnacl_bin_path, 'arm-nacl-objdump')] +
Jim Stichnoth 2016/03/09 14:38:04 IIRC, originally the tests used the system objdump
Sean Klein 2016/03/09 18:27:44 Yeah, I agree that it's not very intuitive that "a
200 args.dis_flags + 200 args.dis_flags +
201 ['-w', '-d', '-r'] + TargetDisassemblerFlags(args.target) + 201 ['-w', '-d', '-r'] + TargetDisassemblerFlags(args.target) +
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()
OLDNEW
« no previous file with comments | « no previous file | tests_lit/lit.cfg » ('j') | tests_lit/lit.cfg » ('J')

Powered by Google App Engine
This is Rietveld 408576698