| OLD | NEW |
| 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 Loading... |
| 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() |
| OLD | NEW |