[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:38:55 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 6d90827767ff55e1b980d7930f0e90aaaad2529c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 16 21:17:00 2009 +0000

    2009-12-16  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            [bzt] Add error handling to the early warning system
            https://bugs.webkit.org/show_bug.cgi?id=32594
    
            This should be the last step in making the EWS operational.  When we
            have a build error, we post the log to QueueStatusServer and add a link
            to the bug.
    
            * Scripts/modules/commands/early_warning_system.py:
            * Scripts/modules/commands/queues.py:
            * Scripts/modules/executive.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52216 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 6359d19..a3489d3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-16  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        [bzt] Add error handling to the early warning system
+        https://bugs.webkit.org/show_bug.cgi?id=32594
+
+        This should be the last step in making the EWS operational.  When we
+        have a build error, we post the log to QueueStatusServer and add a link
+        to the bug.
+
+        * Scripts/modules/commands/early_warning_system.py:
+        * Scripts/modules/commands/queues.py:
+        * Scripts/modules/executive.py:
+
 2009-12-16  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Reviewed by Holger Freyther.
diff --git a/WebKitTools/Scripts/modules/commands/early_warning_system.py b/WebKitTools/Scripts/modules/commands/early_warning_system.py
index e8ef408..a4546bd 100644
--- a/WebKitTools/Scripts/modules/commands/early_warning_system.py
+++ b/WebKitTools/Scripts/modules/commands/early_warning_system.py
@@ -27,10 +27,13 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+from StringIO import StringIO
+
 from modules.commands.queues import AbstractReviewQueue
 from modules.executive import ScriptError
 from modules.webkitport import WebKitPort
 
+
 class AbstractEarlyWarningSystem(AbstractReviewQueue):
     def __init__(self):
         AbstractReviewQueue.__init__(self)
@@ -40,8 +43,10 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
         try:
             self.run_bugzilla_tool(["build", self.port.flag(), "--force-clean", "--quiet"])
         except ScriptError, e:
-            return (False, "Unable to perform a build.", None)
-        return (True, "Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
+            self._update_status("Unable to perform a build.")
+            return False
+        self._update_status("Building patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
+        return True
 
     def process_work_item(self, patch):
         self.run_bugzilla_tool([
@@ -55,6 +60,17 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
             patch["id"]])
         self._patches.did_pass(patch)
 
+    @classmethod
+    def handle_script_error(cls, tool, state, script_error):
+        # FIXME: This won't be right for ports that don't use build-webkit!
+        if not script_error.command_name() == "build-webkit":
+            return
+        patch = state["patch"]
+        status_id = tool.status_bot.update_status(cls.name, "patch %s failed: %s" % (patch["id"], script_error.message), patch, StringIO(script_error.output))
+        results_link = tool.status_bot.results_url_for_status(status_id)
+        message = "Attachment %s did not build on %s:\nFull output: %s" % (patch["id"], cls.port_name, results_link)
+        tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
+
 
 class QtEWS(AbstractEarlyWarningSystem):
     name = "qt-ews"
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index 96377ca..b255bf9 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -29,7 +29,6 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 import os
-import re
 
 from datetime import datetime
 from optparse import make_option
@@ -222,11 +221,7 @@ class StyleQueue(AbstractReviewQueue):
 
     @classmethod
     def handle_script_error(cls, tool, state, script_error):
-        command = script_error.script_args
-        if type(command) is list:
-            command = command[0]
-        # FIXME: We shouldn't need to use a regexp here.  ScriptError should
-        #        have a better API.
-        if re.search("check-webkit-style", command):
-            message = "Attachment %s did not pass %s:\n\n%s" % (state["patch"]["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
-            tool.bugs.post_comment_to_bug(state["patch"]["bug_id"], message, cc=cls.watchers)
+        if not script_error.command_name() == "check-webkit-style":
+            return
+        message = "Attachment %s did not pass %s:\n\n%s" % (state["patch"]["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
+        tool.bugs.post_comment_to_bug(state["patch"]["bug_id"], message, cc=cls.watchers)
diff --git a/WebKitTools/Scripts/modules/executive.py b/WebKitTools/Scripts/modules/executive.py
index b73e17d..6bd3515 100644
--- a/WebKitTools/Scripts/modules/executive.py
+++ b/WebKitTools/Scripts/modules/executive.py
@@ -57,6 +57,12 @@ class ScriptError(Exception):
             return "%s\n%s" % (self, self.output)
         return str(self)
 
+    def command_name(self):
+        command_path = self.script_args
+        if type(command_path) is list:
+            command_path = command_path[0]
+        return os.path.basename(command_path)
+
 
 # FIXME: This should not be a global static.
 # New code should use Executive.run_command directly instead

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list