OLD | NEW |
1 #!/usr/bin/env python2 | 1 #!/usr/bin/env python2 |
2 | 2 |
3 import argparse | 3 import argparse |
4 import collections | 4 import collections |
5 import ConfigParser | 5 import ConfigParser |
6 import os | 6 import os |
7 import shutil | 7 import shutil |
8 import sys | 8 import sys |
9 | 9 |
10 from utils import shellcmd | 10 from utils import shellcmd |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 run_cmd) | 198 run_cmd) |
199 if args.lit: | 199 if args.lit: |
200 # Create a file to drive the lit test. | 200 # Create a file to drive the lit test. |
201 with open(run_cmd_base + '.xtest', 'w') as f: | 201 with open(run_cmd_base + '.xtest', 'w') as f: |
202 f.write('# RUN: sh %s | FileCheck %s\n') | 202 f.write('# RUN: sh %s | FileCheck %s\n') |
203 f.write('cd ' + crosstest_dir + ' && \\\n') | 203 f.write('cd ' + crosstest_dir + ' && \\\n') |
204 f.write(' '.join(cmp_cmd) + ' && \\\n') | 204 f.write(' '.join(cmp_cmd) + ' && \\\n') |
205 f.write(run_cmd + '\n') | 205 f.write(run_cmd + '\n') |
206 f.write('echo Recreate a failure using ' + __file__ + | 206 f.write('echo Recreate a failure using ' + __file__ + |
207 ' --toolchain-root=' + args.toolchain_root + | 207 ' --toolchain-root=' + args.toolchain_root + |
| 208 (' --filetype=' + args.filetype |
| 209 if args.filetype else '') + |
208 ' --include=' + ','.join(desc) + '\n') | 210 ' --include=' + ','.join(desc) + '\n') |
209 f.write('# CHECK: Failures=0\n') | 211 f.write('# CHECK: Failures=0\n') |
210 else: | 212 else: |
211 if not args.no_compile: | 213 if not args.no_compile: |
212 shellcmd(cmp_cmd, | 214 shellcmd(cmp_cmd, |
213 echo=args.verbose) | 215 echo=args.verbose) |
214 if (args.defer): | 216 if (args.defer): |
215 deferred_cmds.append(run_cmd) | 217 deferred_cmds.append(run_cmd) |
216 else: | 218 else: |
217 shellcmd(run_cmd, echo=True) | 219 shellcmd(run_cmd, echo=True) |
218 for run_cmd in deferred_cmds: | 220 for run_cmd in deferred_cmds: |
219 shellcmd(run_cmd, echo=True) | 221 shellcmd(run_cmd, echo=True) |
220 | 222 |
221 if __name__ == '__main__': | 223 if __name__ == '__main__': |
222 main() | 224 main() |
OLD | NEW |