| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 self.printed_allocations = False | 70 self.printed_allocations = False |
| 71 self.tests = [ t for s in suites for t in s.tests ] | 71 self.tests = [ t for s in suites for t in s.tests ] |
| 72 if not context.no_sorting: | 72 if not context.no_sorting: |
| 73 for t in self.tests: | 73 for t in self.tests: |
| 74 t.duration = self.perfdata.FetchPerfData(t) or 1.0 | 74 t.duration = self.perfdata.FetchPerfData(t) or 1.0 |
| 75 self.tests.sort(key=lambda t: t.duration, reverse=True) | 75 self.tests.sort(key=lambda t: t.duration, reverse=True) |
| 76 self._CommonInit(len(self.tests), progress_indicator, context) | 76 self._CommonInit(len(self.tests), progress_indicator, context) |
| 77 | 77 |
| 78 def _CommonInit(self, num_tests, progress_indicator, context): | 78 def _CommonInit(self, num_tests, progress_indicator, context): |
| 79 self.indicator = progress_indicator | 79 self.indicator = progress_indicator |
| 80 progress_indicator.runner = self | 80 progress_indicator.SetRunner(self) |
| 81 self.context = context | 81 self.context = context |
| 82 self.succeeded = 0 | 82 self.succeeded = 0 |
| 83 self.total = num_tests | 83 self.total = num_tests |
| 84 self.remaining = num_tests | 84 self.remaining = num_tests |
| 85 self.failed = [] | 85 self.failed = [] |
| 86 self.crashed = 0 | 86 self.crashed = 0 |
| 87 self.reran_tests = 0 | 87 self.reran_tests = 0 |
| 88 | 88 |
| 89 def _RunPerfSafe(self, fun): | 89 def _RunPerfSafe(self, fun): |
| 90 try: | 90 try: |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 test.suite.GetFlagsForTestCase(test, self.context) + | 282 test.suite.GetFlagsForTestCase(test, self.context) + |
| 283 self.context.extra_flags) | 283 self.context.extra_flags) |
| 284 return cmd | 284 return cmd |
| 285 | 285 |
| 286 | 286 |
| 287 class BreakNowException(Exception): | 287 class BreakNowException(Exception): |
| 288 def __init__(self, value): | 288 def __init__(self, value): |
| 289 self.value = value | 289 self.value = value |
| 290 def __str__(self): | 290 def __str__(self): |
| 291 return repr(self.value) | 291 return repr(self.value) |
| OLD | NEW |