Changeset 159749 in webkit
- Timestamp:
- Nov 25, 2013 7:48:07 AM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r159710 r159749 1 2013-11-25 László Langó <lango@inf.u-szeged.hu> 2 3 EWS creates 0 byte sized log files 4 https://bugs.webkit.org/show_bug.cgi?id=107606 5 6 Reviewed by Ryosuke Niwa. 7 8 There was a modification in r138264, that tried to make less log, 9 because some of the messeges were duplicated. After this the EWS 10 created the log file (with the same name as the bugID) but doesn't 11 write anything into it, even if there were errors during the build. 12 From now only creates the log file only if there is some error. 13 14 * Scripts/webkitpy/tool/bot/queueengine.py: 15 (QueueEngine.run): If the build and tests pass, there is no ScriptError raised, 16 there is nothing to log. Open the log file only if a ScriptError was raised to 17 avoid to make empty log files for bugs. 18 (QueueEngine._open_work_log): Does not need to tee STDOUT to log file anymore, 19 because of changes in r138264. Teeing is used for locally testing purposes and 20 this feature is not used anymore. 21 (QueueEngine._ensure_work_log_closed): Close the logfile. We don't use output 22 teeing anymore. It is a necessary change because of QueueEngine._open_work_log 23 change. 24 * Scripts/webkitpy/tool/bot/queueengine_unittest.py: 25 (LoggingDelegate): The order of the callbacks was changed by this patch. 26 (QueueEngineTest.test_trivial): Won't create log file if the queue was terminated, 27 so we have to update this test. 28 (QueueEngineTest.test_unexpected_error): The order of the callbacks was changed by 29 this patch. 30 * Scripts/webkitpy/tool/commands/earlywarningsystem.py: 31 (AbstractEarlyWarningSystem.review_patch): Raise again the captured ScriptError 32 to be able to handle it in QueueEngine.run. Without this change, the existing 33 exception handler never run (the process_work_item method never raise ScriptError) 34 We can get the error message only from the ScriptError at this point. 35 1 36 2013-11-22 Dean Jackson <dino@apple.com> 2 37 -
trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py
r159696 r159749 98 98 continue 99 99 100 # FIXME: Work logs should not depend on bug_id specificaly.101 # This looks fixed, no?102 self._open_work_log(work_item)103 100 try: 104 101 if not self._delegate.process_work_item(work_item): … … 106 103 continue 107 104 except ScriptError, e: 105 self._open_work_log(work_item) 106 self._work_log.write(e.message_with_output()) 108 107 # Use a special exit code to indicate that the error was already 109 108 # handled in the child process and we should just keep looping. … … 140 139 if not work_item_log_path: 141 140 return 142 self._work_log = self._output_tee. add_log(work_item_log_path)141 self._work_log = self._output_tee._open_log_file(work_item_log_path) 143 142 144 143 def _ensure_work_log_closed(self): 145 144 # If we still have a bug log open, close it. 146 145 if self._work_log: 147 self._ output_tee.remove_log(self._work_log)146 self._work_log.close() 148 147 self._work_log = None 149 148 -
trunk/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
r143109 r159749 51 51 'should_continue_work_queue', 52 52 'next_work_item', 53 'process_work_item', 53 54 'work_item_log_path', 54 'process_work_item',55 55 'should_continue_work_queue', 56 56 'stop_work_queue', … … 120 120 def test_trivial(self): 121 121 delegate = LoggingDelegate(self) 122 expected_callbacks = LoggingDelegate.expected_callbacks[:] 123 expected_callbacks.remove('work_item_log_path') 122 124 self._run_engine(delegate) 123 125 self.assertEqual(delegate.stop_message, "Delegate terminated queue.") 124 self.assertEqual(delegate._callbacks, LoggingDelegate.expected_callbacks)126 self.assertEqual(delegate._callbacks, expected_callbacks) 125 127 self.assertTrue(os.path.exists(os.path.join(self.temp_dir, "queue_log_path"))) 126 self.assertTrue(os.path.exists(os.path.join(self.temp_dir, "work_log_path", "work_item.log")))127 128 128 129 def test_unexpected_error(self): … … 130 131 self._run_engine(delegate) 131 132 expected_callbacks = LoggingDelegate.expected_callbacks[:] 132 work_item_ index = expected_callbacks.index('process_work_item')133 work_item_log_path_index = expected_callbacks.index('work_item_log_path') 133 134 # The unexpected error should be handled right after process_work_item starts 134 135 # but before any other callback. Otherwise callbacks should be normal. 135 expected_callbacks.insert(work_item_ index + 1, 'handle_unexpected_error')136 expected_callbacks.insert(work_item_log_path_index + 1, 'handle_unexpected_error') 136 137 self.assertEqual(delegate._callbacks, expected_callbacks) 137 138 -
trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
r159696 r159749 93 93 self._upload_results_archive_for_patch(patch, results_archive) 94 94 self._did_fail(patch) 95 # FIXME: We're supposed to be able to raise e again here and have 96 # one of our base classes mark the patch as fail, but there seems 97 # to be an issue with the exit_code. 98 return False 95 raise e 99 96 100 97 # EarlyWarningSystemDelegate methods
Note: See TracChangeset
for help on using the changeset viewer.