Changeset 56883 in webkit


Ignore:
Timestamp:
Mar 31, 2010 6:13:28 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-31 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Add the ability to restart sheriffbot from IRC
https://bugs.webkit.org/show_bug.cgi?id=36909

  • Scripts/webkitpy/tool/bot/irc_command.py:
  • Scripts/webkitpy/tool/bot/queueengine.py:
  • Scripts/webkitpy/tool/bot/sheriffircbot.py:
  • Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56881 r56883  
     12010-03-31  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Add the ability to restart sheriffbot from IRC
     6        https://bugs.webkit.org/show_bug.cgi?id=36909
     7
     8        * Scripts/webkitpy/tool/bot/irc_command.py:
     9        * Scripts/webkitpy/tool/bot/queueengine.py:
     10        * Scripts/webkitpy/tool/bot/sheriffircbot.py:
     11        * Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py:
     12
    1132010-03-31  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/irc_command.py

    r56736 r56883  
    2828
    2929from webkitpy.common.checkout.changelog import view_source_url
     30from webkitpy.tool.bot.queueengine import TerminateQueue
     31
    3032
    3133# FIXME: Merge with Command?
     
    4042
    4143
     44class Restart(IRCCommand):
     45    def execute(self, args, tool):
     46        tool.irc().post("Restarting...")
     47        raise TerminateQueue()
     48
     49
    4250class Hi(IRCCommand):
    4351    def execute(self, args, tool):
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/queueengine.py

    r56736 r56883  
    3737from webkitpy.common.system.executive import ScriptError
    3838from webkitpy.common.system.deprecated_logging import log, OutputTee
     39
     40
     41class TerminateQueue(Exception):
     42    pass
     43
    3944
    4045class QueueEngineDelegate:
     
    110115                    message = "Unexpected failure when landing patch!  Please file a bug against webkit-patch.\n%s" % e.message_with_output()
    111116                    self._delegate.handle_unexpected_error(work_item, message)
     117            except TerminateQueue, e:
     118                log("\nTerminateQueue exception received.")
     119                return 0
    112120            except KeyboardInterrupt, e:
    113121                log("\nUser terminated queue.")
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/sheriffircbot.py

    r56658 r56883  
    5656    commands = {
    5757        "last-green-revision": irc_command.LastGreenRevision,
     58        "restart": irc_command.Restart,
    5859        "hi": irc_command.Hi,
    5960    }
  • trunk/WebKitTools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py

    r56739 r56883  
    4747
    4848    def test_bogus(self):
    49         expected_stderr = "MOCK: irc.post: Available commands: hi, last-green-revision\n"
     49        expected_stderr = "MOCK: irc.post: Available commands: hi, restart, last-green-revision\n"
    5050        OutputCapture().assert_outputs(self, run, args=["bogus"], expected_stderr=expected_stderr)
    5151
Note: See TracChangeset for help on using the changeset viewer.