| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Runs each test cases as a single shard, single process execution. | 6 """Runs each test cases as a single shard, single process execution. |
| 7 | 7 |
| 8 Similar to sharding_supervisor.py but finer grained. It runs each test case | 8 Similar to sharding_supervisor.py but finer grained. It runs each test case |
| 9 individually instead of running per shard. Runs multiple instances in parallel. | 9 individually instead of running per shard. Runs multiple instances in parallel. |
| 10 """ | 10 """ |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 returncode = returncode or 1 | 595 returncode = returncode or 1 |
| 596 self.decider.got_result(not bool(returncode)) | 596 self.decider.got_result(not bool(returncode)) |
| 597 if sys.platform == 'win32': | 597 if sys.platform == 'win32': |
| 598 output = output.replace('\r\n', '\n') | 598 output = output.replace('\r\n', '\n') |
| 599 need_to_retry = returncode and try_count < self.retries | 599 need_to_retry = returncode and try_count < self.retries |
| 600 | 600 |
| 601 if try_count: | 601 if try_count: |
| 602 line = '%s (%.2fs) - retry #%d' % (test_case, duration, try_count) | 602 line = '%s (%.2fs) - retry #%d' % (test_case, duration, try_count) |
| 603 else: | 603 else: |
| 604 line = '%s (%.2fs)' % (test_case, duration) | 604 line = '%s (%.2fs)' % (test_case, duration) |
| 605 if self.verbose or (not need_to_retry and returncode): | 605 if self.verbose or returncode: |
| 606 # Print output in one of two cases: | 606 # Print output in one of two cases: |
| 607 # --verbose was specified | 607 # --verbose was specified. |
| 608 # If can't retry but failed. | 608 # The test failed. |
| 609 line += '\n' + output | 609 line += '\n' + output |
| 610 self.progress.update_item(line, True, need_to_retry) | 610 self.progress.update_item(line, True, need_to_retry) |
| 611 | 611 |
| 612 if need_to_retry: | 612 if need_to_retry: |
| 613 # The test failed and needs to be retried.. | 613 # The test failed and needs to be retried.. |
| 614 self.add_task(self.map, test_case, try_count + 1) | 614 self.add_task(self.map, test_case, try_count + 1) |
| 615 return [data] | 615 return [data] |
| 616 | 616 |
| 617 | 617 |
| 618 def get_test_cases(cmd, cwd, whitelist, blacklist, index, shards, seed): | 618 def get_test_cases(cmd, cwd, whitelist, blacklist, index, shards, seed): |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 options.run_all, | 1092 options.run_all, |
| 1093 options.max_failures, | 1093 options.max_failures, |
| 1094 options.no_cr, | 1094 options.no_cr, |
| 1095 options.gtest_output, | 1095 options.gtest_output, |
| 1096 result_file, | 1096 result_file, |
| 1097 options.verbose) | 1097 options.verbose) |
| 1098 | 1098 |
| 1099 | 1099 |
| 1100 if __name__ == '__main__': | 1100 if __name__ == '__main__': |
| 1101 sys.exit(main(sys.argv[1:])) | 1101 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |