Changeset 94036 in webkit
- Timestamp:
- Aug 29, 2011, 6:43:57 PM (15 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
Scripts/webkitpy/tool/bot/irc_command.py (modified) (3 diffs)
-
Scripts/webkitpy/tool/bot/irc_command_unittest.py (modified) (3 diffs)
-
Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r94031 r94036 1 2011-08-29 Tom Zakrajsek <tomz@codeaurora.org> 2 3 sheriffbot "usage" help statements are wrong 4 https://bugs.webkit.org/show_bug.cgi?id=67170 5 6 Reviewed by Adam Barth. 7 8 * Scripts/webkitpy/tool/bot/irc_command.py: 9 * Scripts/webkitpy/tool/bot/irc_command_unittest.py: 10 * Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py: 11 1 12 2011-08-29 Adam Barth <abarth@webkit.org> 2 13 -
trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py
r91210 r94036 110 110 if (not svn_revision_list or not rollout_reason): 111 111 # return is equivalent to an irc().post(), but makes for easier unit testing. 112 return "%s: Usage: SVN_REVISION [SVN_REVISIONS] REASON" % nick112 return "%s: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON" % nick 113 113 114 114 self._update_working_copy(tool) … … 175 175 def execute(self, nick, args, tool, sheriff): 176 176 if len(args) != 1: 177 return "%s: Usage: BUGZILLA_EMAIL" % nick177 return "%s: Usage: whois BUGZILLA_EMAIL" % nick 178 178 email = args[0] 179 179 # FIXME: We should get the ContributorList off the tool somewhere. … … 201 201 def execute(self, nick, args, tool, sheriff): 202 202 if not args: 203 return "%s: Usage: BUG_TITLE" % nick203 return "%s: Usage: create-bug BUG_TITLE" % nick 204 204 205 205 bug_title = " ".join(args) -
trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
r91210 r94036 42 42 def test_whois(self): 43 43 whois = Whois() 44 self.assertEquals("tom: Usage: BUGZILLA_EMAIL",44 self.assertEquals("tom: Usage: whois BUGZILLA_EMAIL", 45 45 whois.execute("tom", [], None, None)) 46 self.assertEquals("tom: Usage: BUGZILLA_EMAIL",46 self.assertEquals("tom: Usage: whois BUGZILLA_EMAIL", 47 47 whois.execute("tom", ["Adam", "Barth"], None, None)) 48 48 self.assertEquals("tom: Sorry, I don't know unknown@example.com. Maybe you could introduce me?", … … 55 55 def test_create_bug(self): 56 56 create_bug = CreateBug() 57 self.assertEquals("tom: Usage: BUG_TITLE",57 self.assertEquals("tom: Usage: create-bug BUG_TITLE", 58 58 create_bug.execute("tom", [], None, None)) 59 59 … … 94 94 95 95 # Invalid arguments result in the USAGE message. 96 self.assertEquals("tom: Usage: SVN_REVISION [SVN_REVISIONS] REASON",96 self.assertEquals("tom: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON", 97 97 rollout.execute("tom", [], None, None)) 98 98 -
trunk/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py
r90521 r94036 119 119 120 120 def test_rollout_bananas(self): 121 expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"121 expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n" 122 122 OutputCapture().assert_outputs(self, run, args=["rollout bananas"], expected_stderr=expected_stderr) 123 123 124 124 def test_rollout_invalidate_revision(self): 125 125 # When folks pass junk arguments, we should just spit the usage back at them. 126 expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"126 expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n" 127 127 OutputCapture().assert_outputs(self, run, 128 128 args=["rollout --component=Tools 21654"], … … 150 150 151 151 def test_rollout_no_reason(self): 152 expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"152 expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n" 153 153 OutputCapture().assert_outputs(self, run, args=["rollout 21654"], expected_stderr=expected_stderr) 154 154 155 155 def test_multi_rollout_no_reason(self): 156 expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"156 expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n" 157 157 OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 r21656"], expected_stderr=expected_stderr)
Note:
See TracChangeset
for help on using the changeset viewer.