| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 ''' Installs and runs (a subset of) the gcc toolchain test suite against | 6 ''' Installs and runs (a subset of) the gcc toolchain test suite against |
| 7 various nacl and non-nacl toolchains | 7 various nacl and non-nacl toolchains |
| 8 ''' | 8 ''' |
| 9 | 9 |
| 10 import glob | 10 import glob |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 config_map = { 'pnacl': 'llvm_pnacl', | 81 config_map = { 'pnacl': 'llvm_pnacl', |
| 82 'naclgcc': 'nacl_gcc', | 82 'naclgcc': 'nacl_gcc', |
| 83 'localgcc': 'local_gcc', | 83 'localgcc': 'local_gcc', |
| 84 'clang': 'nacl_clang'} | 84 'clang': 'nacl_clang'} |
| 85 | 85 |
| 86 failures = [] | 86 failures = [] |
| 87 if compiler == 'pnacl': | 87 if compiler == 'pnacl': |
| 88 # O3_O0 is clang -O3 followed by pnacl-translate -O0 | 88 # O3_O0 is clang -O3 followed by pnacl-translate -O0 |
| 89 optmodes = ['O0', 'O3', 'O0_O0', 'O3_O0'] | 89 optmodes = ['O0', 'O3', 'O0_O0', 'O3_O0'] |
| 90 if platform == 'x86-32': | 90 if platform in ('x86-32', 'x86-64'): |
| 91 # Add some extra Subzero configurations. | 91 # Add some extra Subzero configurations. |
| 92 optmodes.extend(['O3_sz', 'O3_O0_sz']) | 92 optmodes.extend(['O3_sz', 'O3_O0_sz']) |
| 93 # TODO(stichnot): Consider pruning some configurations if the tests run | 93 # TODO(stichnot): Consider pruning some configurations if the tests run |
| 94 # too long. | 94 # too long. |
| 95 else: | 95 else: |
| 96 optmodes = ['O0', 'O3'] | 96 optmodes = ['O0', 'O3'] |
| 97 for optmode in optmodes: | 97 for optmode in optmodes: |
| 98 # TODO: support an option like -k? For now, always keep going | 98 # TODO: support an option like -k? For now, always keep going |
| 99 config = '_'.join((config_map[compiler], platform, optmode)) | 99 config = '_'.join((config_map[compiler], platform, optmode)) |
| 100 | 100 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 131 platform = sys.argv[2] | 131 platform = sys.argv[2] |
| 132 tester_argv = sys.argv[3:] | 132 tester_argv = sys.argv[3:] |
| 133 except IndexError: | 133 except IndexError: |
| 134 usage() | 134 usage() |
| 135 sys.exit(1) | 135 sys.exit(1) |
| 136 | 136 |
| 137 return run_torture(status, compiler, platform, tester_argv) | 137 return run_torture(status, compiler, platform, tester_argv) |
| 138 | 138 |
| 139 if __name__ == '__main__': | 139 if __name__ == '__main__': |
| 140 sys.exit(main()) | 140 sys.exit(main()) |
| OLD | NEW |