| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 else: | 131 else: |
| 132 continue | 132 continue |
| 133 if self.terminate: | 133 if self.terminate: |
| 134 pool.terminate() | 134 pool.terminate() |
| 135 pool.join() | 135 pool.join() |
| 136 raise BreakNowException("User pressed Ctrl+C or IO went wrong") | 136 raise BreakNowException("User pressed Ctrl+C or IO went wrong") |
| 137 test = test_map[test_id] | 137 test = test_map[test_id] |
| 138 self.indicator.AboutToRun(test) | 138 self.indicator.AboutToRun(test) |
| 139 test.output = result[1] | 139 test.output = result[1] |
| 140 test.duration = result[2] | 140 test.duration = result[2] |
| 141 if test.suite.HasUnexpectedOutput(test): | 141 has_unexpected_output = test.suite.HasUnexpectedOutput(test) |
| 142 if has_unexpected_output: |
| 142 self.failed.append(test) | 143 self.failed.append(test) |
| 143 if test.output.HasCrashed(): | 144 if test.output.HasCrashed(): |
| 144 self.crashed += 1 | 145 self.crashed += 1 |
| 145 else: | 146 else: |
| 146 self.succeeded += 1 | 147 self.succeeded += 1 |
| 147 self.remaining -= 1 | 148 self.remaining -= 1 |
| 148 self.indicator.HasRun(test) | 149 self.indicator.HasRun(test, has_unexpected_output) |
| 149 except KeyboardInterrupt: | 150 except KeyboardInterrupt: |
| 150 pool.terminate() | 151 pool.terminate() |
| 151 pool.join() | 152 pool.join() |
| 152 raise | 153 raise |
| 153 except Exception, e: | 154 except Exception, e: |
| 154 print("Exception: %s" % e) | 155 print("Exception: %s" % e) |
| 155 pool.terminate() | 156 pool.terminate() |
| 156 pool.join() | 157 pool.join() |
| 157 raise | 158 raise |
| 158 if queued_exception: | 159 if queued_exception: |
| (...skipping 14 matching lines...) Expand all Loading... |
| 173 test.suite.GetFlagsForTestCase(test, self.context) + | 174 test.suite.GetFlagsForTestCase(test, self.context) + |
| 174 self.context.extra_flags) | 175 self.context.extra_flags) |
| 175 return cmd | 176 return cmd |
| 176 | 177 |
| 177 | 178 |
| 178 class BreakNowException(Exception): | 179 class BreakNowException(Exception): |
| 179 def __init__(self, value): | 180 def __init__(self, value): |
| 180 self.value = value | 181 self.value = value |
| 181 def __str__(self): | 182 def __str__(self): |
| 182 return repr(self.value) | 183 return repr(self.value) |
| OLD | NEW |