Changeset 80284 in webkit
- Timestamp:
- Mar 3, 2011 2:18:54 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r80267 r80284 1 2011-03-03 Mihai Parparita <mihaip@chromium.org> 2 3 Reviewed by Tony Chang. 4 5 NRWT: AttributeError: TestRunner2 instance has no attribute '_cancel_workers' 6 https://bugs.webkit.org/show_bug.cgi?id=55694 7 8 Fixes for interruptions in NRWT: 9 - Make TestRunInterruptedException be pickleable correctly (the base 10 Exception class defines a __reduce__ that does not include the reason) 11 - Fix ordering of returned arguments from TestRunner2._run_tests 12 (interrupted and keyboard_interrupted were reversed) 13 - Fix cancel_workers callsites (was using old name). 14 - In handle_exception re-raise actual exception instance that was thrown 15 16 * Scripts/webkitpy/layout_tests/layout_package/test_runner.py: 17 * Scripts/webkitpy/layout_tests/layout_package/test_runner2.py: 18 * Scripts/webkitpy/layout_tests/layout_package/worker.py: 19 * Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py: 20 1 21 2011-03-03 Qi Zhang <qi.2.zhang@nokia.com> 2 22 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner.py
r80090 r80284 163 163 def __init__(self, reason): 164 164 self.reason = reason 165 166 def __reduce__(self): 167 return self.__class__, (self.reason,) 165 168 166 169 -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py
r78930 r80284 101 101 """Runs the tests in the file_list. 102 102 103 Return: A tuple (keyboard_interrupted, thread_timings, test_timings, 104 individual_test_timings) 103 Return: A tuple (interrupted, keyboard_interrupted, thread_timings, 104 test_timings, individual_test_timings) 105 interrupted is whether the run was interrupted 105 106 keyboard_interrupted is whether someone typed Ctrl^C 106 107 thread_timings is a list of dicts with the total runtime … … 178 179 except KeyboardInterrupt: 179 180 _log.info("Interrupted, exiting") 180 self. _cancel_workers()181 self.cancel_workers() 181 182 keyboard_interrupted = True 182 183 except test_runner.TestRunInterruptedException, e: 183 184 _log.info(e.reason) 184 self. _cancel_workers()185 self.cancel_workers() 185 186 interrupted = True 186 187 except: … … 192 193 193 194 # FIXME: should this be a class instead of a tuple? 194 return ( keyboard_interrupted,interrupted, thread_timings,195 return (interrupted, keyboard_interrupted, thread_timings, 195 196 self._group_stats, self._all_results) 196 197 … … 209 210 210 211 def handle_exception(self, source, exception_info): 211 raise exception_info 212 exception_type, exception_value, exception_traceback = exception_info 213 raise exception_type, exception_value, exception_traceback 212 214 213 215 def handle_finished_list(self, source, list_name, num_tests, elapsed_time): -
trunk/Tools/Scripts/webkitpy/layout_tests/layout_package/worker.py
r78512 r80284 83 83 _log.debug("%s done%s" % (self._name, exception_msg)) 84 84 if exception_msg: 85 exc _info= sys.exc_info()86 stack_utils.log_traceback(_log.error, exc _info[2])85 exception_type, exception_value, exception_traceback = sys.exc_info() 86 stack_utils.log_traceback(_log.error, exception_traceback) 87 87 # FIXME: Figure out how to send a message with a traceback. 88 88 self._worker_connection.post_message('exception', 89 (exc _info[0], exc_info[1], None))89 (exception_type, exception_value, None)) 90 90 self._worker_connection.post_message('done') 91 91 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py
r79973 r80284 237 237 ['failures/expected/keyboard.html'], tests_included=True) 238 238 239 def test_keyboard_interrupt_inline_worker_model(self): 240 self.assertRaises(KeyboardInterrupt, logging_run, 241 ['failures/expected/keyboard.html', '--worker-model', 'inline'], 242 tests_included=True) 243 239 244 def test_last_results(self): 240 245 fs = port.unit_test_filesystem() … … 416 421 flatten_batches=True) 417 422 self.assertEquals(['failures/expected/crash.html', 'passes/text.html'], tests_run) 423 424 def test_exit_after_n_crashes_inline_worker_model(self): 425 tests_run = get_tests_run([ 426 'failures/unexpected/timeout.html', 427 'passes/text.html', 428 '--exit-after-n-crashes-or-timeouts', '1', 429 '--worker-model', 'inline', 430 ], 431 tests_included=True, 432 flatten_batches=True) 433 self.assertEquals(['failures/unexpected/timeout.html'], tests_run) 418 434 419 435 def test_results_directory_absolute(self):
Note: See TracChangeset
for help on using the changeset viewer.