Changeset 136036 in webkit
- Timestamp:
- Nov 28, 2012, 11:54:25 AM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r136031 r136036 1 2012-11-28 Zan Dobersek <zandobersek@gmail.com> 2 3 Remove deprecated logging usage from QueueEngine 4 https://bugs.webkit.org/show_bug.cgi?id=103532 5 6 Reviewed by Dirk Pranke. 7 8 Replace usage of deprecated logging in webkitpy.tool.bot.queueengine with 9 logging through the Logger object. The unit test is modified to reflect 10 these changes. 11 12 After these changes the deprecated logging (i.e. logging to stderr) is not 13 used anymore through webkitpy and can be removed. 14 15 * Scripts/webkitpy/tool/bot/queueengine.py: 16 (QueueEngine.exit_after_handled_error): 17 (QueueEngine.run): 18 (QueueEngine._stopping): 19 (QueueEngine._sleep): 20 * Scripts/webkitpy/tool/bot/queueengine_unittest.py: 21 (QueueEngineTest._run_engine): 22 1 23 2012-11-28 Nate Chapin <japhet@chromium.org> 2 24 -
trunk/Tools/Scripts/webkitpy/tool/bot/queueengine.py
r108737 r136036 28 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 29 30 import logging 30 31 import sys 31 32 import traceback … … 34 35 35 36 from webkitpy.common.system.executive import ScriptError 36 from webkitpy.common.system.deprecated_logging import log, OutputTee 37 from webkitpy.common.system.deprecated_logging import OutputTee 38 39 _log = logging.getLogger(__name__) 37 40 38 41 … … 81 84 @classmethod 82 85 def exit_after_handled_error(cls, error): 83 log(error)86 _log.error(error) 84 87 sys.exit(cls.handled_error_code) 85 88 … … 101 104 try: 102 105 if not self._delegate.process_work_item(work_item): 103 log("Unable to process work item.")106 _log.warning("Unable to process work item.") 104 107 continue 105 108 except ScriptError, e: … … 124 127 125 128 def _stopping(self, message): 126 log("\n%s" % message)129 _log.info("\n%s" % message) 127 130 self._delegate.stop_work_queue(message) 128 131 # Be careful to shut down our OutputTee or the unit tests will be unhappy. … … 155 158 156 159 def _sleep(self, message): 157 log(self._sleep_message(message))160 _log.info(self._sleep_message(message)) 158 161 self._wakeup_event.wait(self.seconds_to_sleep) 159 162 self._wakeup_event.clear() -
trunk/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
r134636 r136036 146 146 if not termination_message: 147 147 termination_message = "Delegate terminated queue." 148 expected_ stderr= "\n%s\n" % termination_message149 OutputCapture().assert_outputs(self, engine.run, expected_ stderr=expected_stderr)148 expected_logs = "\n%s\n" % termination_message 149 OutputCapture().assert_outputs(self, engine.run, expected_logs=expected_logs) 150 150 151 151 def _test_terminating_queue(self, exception, termination_message):
Note:
See TracChangeset
for help on using the changeset viewer.