Changeset 52695 in webkit


Ignore:
Timestamp:
Jan 3, 2010 6:03:01 PM (14 years ago)
Author:
eric@webkit.org
Message:

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

Reviewed by Eric Seidel.

Implement mac-ews
https://bugs.webkit.org/show_bug.cgi?id=33072

The mac-ews is slightly different than the other early warning systems
because we can't run Mac OS X inside a VM. For that reason, we only
process patches that were uploaded by committers. This isn't as much
coverage as the other EWS bots, but it's better than nothing.

  • Scripts/modules/commands/early_warning_system.py:
  • Scripts/modules/commands/early_warning_system_unittest.py:
  • Scripts/modules/commands/queues.py:
  • Scripts/modules/commands/queuestest.py:
  • Scripts/modules/mock_bugzillatool.py:
Location:
trunk/WebKitTools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52692 r52695  
     12010-01-03  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Implement mac-ews
     6        https://bugs.webkit.org/show_bug.cgi?id=33072
     7
     8        The mac-ews is slightly different than the other early warning systems
     9        because we can't run Mac OS X inside a VM.  For that reason, we only
     10        process patches that were uploaded by committers.  This isn't as much
     11        coverage as the other EWS bots, but it's better than nothing.
     12
     13        * Scripts/modules/commands/early_warning_system.py:
     14        * Scripts/modules/commands/early_warning_system_unittest.py:
     15        * Scripts/modules/commands/queues.py:
     16        * Scripts/modules/commands/queuestest.py:
     17        * Scripts/modules/mock_bugzillatool.py:
     18
    1192010-01-03  Chris Jerdonek  <chris.jerdonek@gmail.com>
    220
  • trunk/WebKitTools/Scripts/modules/commands/early_warning_system.py

    r52430 r52695  
    3131
    3232from modules.commands.queues import AbstractReviewQueue
     33from modules.committers import CommitterList
    3334from modules.executive import ScriptError
    3435from modules.webkitport import WebKitPort
     
    9293        "dglazkov@chromium.org",
    9394    ]
     95
     96
     97# For platforms that we can't run inside a VM (like Mac OS X), we require
     98# patches to be uploaded by committers, who are generally trustworthy folk. :)
     99class AbstractCommitterOnlyEWS(AbstractEarlyWarningSystem):
     100    def __init__(self, committers=CommitterList()):
     101        AbstractEarlyWarningSystem.__init__(self)
     102        self._committers = committers
     103
     104    def process_work_item(self, patch):
     105        if not self._committers.committer_by_email(patch["attacher_email"]):
     106            self._did_error(patch, "%s cannot process patches from non-committers :(" % self.name)
     107            return
     108        AbstractEarlyWarningSystem.process_work_item(self, patch)
     109
     110
     111class MacEWS(AbstractCommitterOnlyEWS):
     112    name = "mac-ews"
     113    port_name = "mac"
  • trunk/WebKitTools/Scripts/modules/commands/early_warning_system_unittest.py

    r52430 r52695  
    5555        }
    5656        self.assert_queue_outputs(GtkEWS(), expected_stderr=expected_stderr)
     57
     58    def test_mac_ews(self):
     59        expected_stderr = {
     60            "begin_work_queue" : "CAUTION: mac-ews will discard all local changes in \"%s\"\nRunning WebKit mac-ews.\n" % os.getcwd(),
     61            "handle_unexpected_error" : "Mock error message\n",
     62        }
     63        self.assert_queue_outputs(MacEWS(), expected_stderr=expected_stderr)
  • trunk/WebKitTools/Scripts/modules/commands/queues.py

    r52667 r52695  
    7474        self._update_status(self._fail_status, patch)
    7575
     76    def _did_error(self, patch, reason):
     77        message = "%s: %s" % (self._error_status, reason)
     78        self._update_status(message, patch)
     79
    7680    def queue_log_path(self):
    7781        return "%s.log" % self.name
  • trunk/WebKitTools/Scripts/modules/commands/queuestest.py

    r52430 r52695  
    4646        "id" : 1234,
    4747        "bug_id" : 345,
     48        "attacher_email": "adam@example.com",
    4849    }
    4950
  • trunk/WebKitTools/Scripts/modules/mock_bugzillatool.py

    r52645 r52695  
    3939    return dictionary
    4040
    41 # FIXME: The ids shoudl be 1, 2, 3 instead of crazy numbers.
     41# FIXME: The ids should be 1, 2, 3 instead of crazy numbers.
    4242_patch1 = {
    4343    "id" : 197,
Note: See TracChangeset for help on using the changeset viewer.