[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:52:52 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 9f12418ffc80df657cd2b67968eb70b8468e7369
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 4 02:03:01 2010 +0000

    2010-01-03  Adam Barth  <abarth at 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:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52695 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 2f646d2..7aa6acf 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-01-03  Adam Barth  <abarth at 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:
+
 2010-01-03  Chris Jerdonek  <chris.jerdonek at gmail.com>
 
         Reviewed by David Kilzer.
diff --git a/WebKitTools/Scripts/modules/commands/early_warning_system.py b/WebKitTools/Scripts/modules/commands/early_warning_system.py
index 56d2035..a96eaf1 100644
--- a/WebKitTools/Scripts/modules/commands/early_warning_system.py
+++ b/WebKitTools/Scripts/modules/commands/early_warning_system.py
@@ -30,6 +30,7 @@
 from StringIO import StringIO
 
 from modules.commands.queues import AbstractReviewQueue
+from modules.committers import CommitterList
 from modules.executive import ScriptError
 from modules.webkitport import WebKitPort
 
@@ -91,3 +92,22 @@ class ChromiumEWS(AbstractEarlyWarningSystem):
     watchers = AbstractEarlyWarningSystem.watchers + [
         "dglazkov at chromium.org",
     ]
+
+
+# For platforms that we can't run inside a VM (like Mac OS X), we require
+# patches to be uploaded by committers, who are generally trustworthy folk. :)
+class AbstractCommitterOnlyEWS(AbstractEarlyWarningSystem):
+    def __init__(self, committers=CommitterList()):
+        AbstractEarlyWarningSystem.__init__(self)
+        self._committers = committers
+
+    def process_work_item(self, patch):
+        if not self._committers.committer_by_email(patch["attacher_email"]):
+            self._did_error(patch, "%s cannot process patches from non-committers :(" % self.name)
+            return
+        AbstractEarlyWarningSystem.process_work_item(self, patch)
+
+
+class MacEWS(AbstractCommitterOnlyEWS):
+    name = "mac-ews"
+    port_name = "mac"
diff --git a/WebKitTools/Scripts/modules/commands/early_warning_system_unittest.py b/WebKitTools/Scripts/modules/commands/early_warning_system_unittest.py
index a5459df..356e91e 100644
--- a/WebKitTools/Scripts/modules/commands/early_warning_system_unittest.py
+++ b/WebKitTools/Scripts/modules/commands/early_warning_system_unittest.py
@@ -54,3 +54,10 @@ class EarlyWarningSytemTest(QueuesTest):
             "handle_unexpected_error" : "Mock error message\n",
         }
         self.assert_queue_outputs(GtkEWS(), expected_stderr=expected_stderr)
+
+    def test_mac_ews(self):
+        expected_stderr = {
+            "begin_work_queue" : "CAUTION: mac-ews will discard all local changes in \"%s\"\nRunning WebKit mac-ews.\n" % os.getcwd(),
+            "handle_unexpected_error" : "Mock error message\n",
+        }
+        self.assert_queue_outputs(MacEWS(), expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index c8d34c7..48c25fa 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -73,6 +73,10 @@ class AbstractQueue(Command, QueueEngineDelegate):
     def _did_fail(self, patch):
         self._update_status(self._fail_status, patch)
 
+    def _did_error(self, patch, reason):
+        message = "%s: %s" % (self._error_status, reason)
+        self._update_status(message, patch)
+
     def queue_log_path(self):
         return "%s.log" % self.name
 
diff --git a/WebKitTools/Scripts/modules/commands/queuestest.py b/WebKitTools/Scripts/modules/commands/queuestest.py
index 03f075e..6cb22a2 100644
--- a/WebKitTools/Scripts/modules/commands/queuestest.py
+++ b/WebKitTools/Scripts/modules/commands/queuestest.py
@@ -45,6 +45,7 @@ class QueuesTest(unittest.TestCase):
     mock_work_item = {
         "id" : 1234,
         "bug_id" : 345,
+        "attacher_email": "adam at example.com",
     }
 
     def assert_queue_outputs(self, queue, args=None, work_item=None, expected_stdout=None, expected_stderr=None, options=Mock(), tool=MockBugzillaTool()):
diff --git a/WebKitTools/Scripts/modules/mock_bugzillatool.py b/WebKitTools/Scripts/modules/mock_bugzillatool.py
index 75df370..533302d 100644
--- a/WebKitTools/Scripts/modules/mock_bugzillatool.py
+++ b/WebKitTools/Scripts/modules/mock_bugzillatool.py
@@ -38,7 +38,7 @@ def _id_to_object_dictionary(*objects):
         dictionary[thing["id"]] = thing
     return dictionary
 
-# FIXME: The ids shoudl be 1, 2, 3 instead of crazy numbers.
+# FIXME: The ids should be 1, 2, 3 instead of crazy numbers.
 _patch1 = {
     "id" : 197,
     "bug_id" : 42,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list