Changeset 87107 in webkit


Ignore:
Timestamp:
May 23, 2011 4:52:03 PM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-05-23 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

sheriffbot should give more details about the failures in IRC
https://bugs.webkit.org/show_bug.cgi?id=61233

With this patch, sheriffbot will annonce the set of failing tests,
which might help folks triage the problem.

  • Scripts/webkitpy/tool/commands/sheriffbot.py:
  • Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r87080 r87107  
     12011-05-23  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        sheriffbot should give more details about the failures in IRC
     6        https://bugs.webkit.org/show_bug.cgi?id=61233
     7
     8        With this patch, sheriffbot will annonce the set of failing tests,
     9        which might help folks triage the problem.
     10
     11        * Scripts/webkitpy/tool/commands/sheriffbot.py:
     12        * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
     13
    1142011-05-23  Sheriff Bot  <webkit.review.bot@gmail.com>
    215
  • trunk/Tools/Scripts/webkitpy/common/net/failuremap.py

    r73776 r87107  
    6060        return sorted(result)
    6161
     62    def failing_tests(self):
     63        return set(sum([self.tests_failing_for(revision) for revision in self.failing_revisions()], []))
     64
    6265    def _old_failures(self, is_old_failure):
    6366        return filter(lambda revision: is_old_failure(revision),
  • trunk/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py

    r69480 r87107  
    7575        failure_map = self._make_failure_map()
    7676        self.assertEquals(failure_map.tests_failing_for(1234), [u'test1'])
     77
     78    def test_failing_tests(self):
     79        failure_map = self._make_failure_map()
     80        self.assertEquals(failure_map.failing_tests(), set([u'test1']))
  • trunk/Tools/Scripts/webkitpy/tool/bot/sheriff.py

    r85727 r87107  
    5252        self._tool.irc().post(irc_message)
    5353
     54    def post_irc_summary(self, failure_map):
     55        failing_tests = failure_map.failing_tests()
     56        if not failing_tests:
     57            return
     58        test_list_limit = 5
     59        irc_message = "New failures: %s" % ", ".join(sorted(failing_tests)[:test_list_limit])
     60        if len(failing_tests) > test_list_limit:
     61            irc_message += " (and more...)"
     62        self._tool.irc().post(irc_message)
     63
    5464    def post_rollout_patch(self, svn_revision_list, rollout_reason):
    5565        # Ensure that svn revisions are numbers (and not options to
  • trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py

    r86382 r87107  
    8282        for revision in failing_revisions:
    8383            builders = failure_map.builders_failing_for(revision)
    84             tests = failure_map.tests_failing_for(revision)
    8584            try:
    8685                commit_info = self._tool.checkout().commit_info_for_revision(revision)
     
    9392                for builder in builders:
    9493                    self._tool.status_server.update_svn_revision(revision, builder.name())
     94        self._sheriff.post_irc_summary(failure_map)
    9595        return True
    9696
  • trunk/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py

    r86382 r87107  
    4545            "next_work_item": "",
    4646            "process_work_item": """MOCK: irc.post: abarth, darin, eseidel: http://trac.webkit.org/changeset/29837 might have broken Builder1
     47MOCK: irc.post: New failures: mock-test-1
    4748""",
    48             "handle_unexpected_error": "Mock error message\n"
     49            "handle_unexpected_error": "Mock error message\n",
    4950        }
    5051        self.assert_queue_outputs(SheriffBot(), work_item=mock_work_item, expected_stderr=expected_stderr)
     52
     53    def test_many_failing_tests(self):
     54        tool = MockTool()
     55        mock_work_item = MockFailureMap(tool.buildbot)
     56        mock_work_item.failing_tests = lambda: set(["test1", "test2", "test3", "test4", "test5", "test6", "test7"])
     57        expected_stderr = {
     58            "begin_work_queue": self._default_begin_work_queue_stderr("sheriff-bot", tool.scm().checkout_root),
     59            "next_work_item": "",
     60            "process_work_item": """MOCK: irc.post: abarth, darin, eseidel: http://trac.webkit.org/changeset/29837 might have broken Builder1
     61MOCK: irc.post: New failures: test1, test2, test3, test4, test5 (and more...)
     62""",
     63            "handle_unexpected_error": "Mock error message\n",
     64        }
     65        self.assert_queue_outputs(SheriffBot(), work_item=mock_work_item, expected_stderr=expected_stderr)
  • trunk/Tools/Scripts/webkitpy/tool/mocktool.py

    r85465 r87107  
    413413        return ["mock-test-1"]
    414414
     415    def failing_tests(self):
     416        return set(["mock-test-1"])
     417
    415418
    416419class MockBuildBot(object):
Note: See TracChangeset for help on using the changeset viewer.