| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium 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 """Implements a simple "negative compile" test for C++ on linux. | 6 """Implements a simple "negative compile" test for C++ on linux. |
| 7 | 7 |
| 8 Sometimes a C++ API needs to ensure that various usages cannot compile. To | 8 Sometimes a C++ API needs to ensure that various usages cannot compile. To |
| 9 enable unittesting of these assertions, we use this python script to | 9 enable unittesting of these assertions, we use this python script to |
| 10 invoke gcc on a source file and assert that compilation fails. | 10 invoke gcc on a source file and assert that compilation fails. |
| 11 | 11 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 timings['results_processed'] = time.time() | 463 timings['results_processed'] = time.time() |
| 464 | 464 |
| 465 # We always know at least a sanity test was run. | 465 # We always know at least a sanity test was run. |
| 466 WriteStats(resultfile, finished_tests[0]['suite_name'], timings) | 466 WriteStats(resultfile, finished_tests[0]['suite_name'], timings) |
| 467 | 467 |
| 468 resultfile.close() | 468 resultfile.close() |
| 469 | 469 |
| 470 | 470 |
| 471 if __name__ == '__main__': | 471 if __name__ == '__main__': |
| 472 main() | 472 main() |
| OLD | NEW |