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

Side by Side Diff: pydir/crosstest_generator.py

Issue 1195553002: Subzero: Correct the cross test's diagnostic message for a test failure. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
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 ConfigParser 4 import ConfigParser
5 import os 5 import os
6 import shutil 6 import shutil
7 import sys 7 import sys
8 8
9 from utils import shellcmd 9 from utils import shellcmd
10 from utils import FindBaseNaCl 10 from utils import FindBaseNaCl
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 else: 169 else:
170 run_cmd = RunNativePrefix(args.toolchain_root, target, run_cmd) 170 run_cmd = RunNativePrefix(args.toolchain_root, target, run_cmd)
171 if args.lit: 171 if args.lit:
172 # Create a file to drive the lit test. 172 # Create a file to drive the lit test.
173 with open(run_cmd_base + '.xtest', 'w') as f: 173 with open(run_cmd_base + '.xtest', 'w') as f:
174 f.write('# RUN: sh %s | FileCheck %s\n') 174 f.write('# RUN: sh %s | FileCheck %s\n')
175 f.write('cd ' + crosstest_dir + ' && \\\n') 175 f.write('cd ' + crosstest_dir + ' && \\\n')
176 f.write(' '.join(cmp_cmd) + ' && \\\n') 176 f.write(' '.join(cmp_cmd) + ' && \\\n')
177 f.write(run_cmd + '\n') 177 f.write(run_cmd + '\n')
178 f.write('echo Recreate a failure using ' + __file__ + 178 f.write('echo Recreate a failure using ' + __file__ +
179 ' --toolchain-root=' + args.toolchain_root +
179 ' --include=' + ','.join(desc) + '\n') 180 ' --include=' + ','.join(desc) + '\n')
180 f.write('# CHECK: Failures=0\n') 181 f.write('# CHECK: Failures=0\n')
181 else: 182 else:
182 if not args.no_compile: 183 if not args.no_compile:
183 shellcmd(cmp_cmd, 184 shellcmd(cmp_cmd,
184 echo=args.verbose) 185 echo=args.verbose)
185 if (args.defer): 186 if (args.defer):
186 deferred_cmds.append(run_cmd) 187 deferred_cmds.append(run_cmd)
187 else: 188 else:
188 shellcmd(run_cmd, echo=True) 189 shellcmd(run_cmd, echo=True)
189 for run_cmd in deferred_cmds: 190 for run_cmd in deferred_cmds:
190 shellcmd(run_cmd, echo=True) 191 shellcmd(run_cmd, echo=True)
191 192
192 if __name__ == '__main__': 193 if __name__ == '__main__':
193 main() 194 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698