[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:46:26 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 7affc40aee038605b21743982f684c086fbf33b5
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Oct 17 00:04:41 2009 +0000

    2009-10-16  Eric Seidel  <eric at webkit.org>
    
            Reviewed by Adam Barth.
    
            commit-queue status bot should list which buildbot is blocking the queue
            https://bugs.webkit.org/show_bug.cgi?id=30452
    
            Add new methods and testing.
    
            * Scripts/bugzilla-tool:
            * Scripts/modules/buildbot.py:
            * Scripts/modules/buildbot_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49708 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index a477c65..d6faf4c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,19 @@
 
         Reviewed by Adam Barth.
 
+        commit-queue status bot should list which buildbot is blocking the queue
+        https://bugs.webkit.org/show_bug.cgi?id=30452
+
+        Add new methods and testing.
+
+        * Scripts/bugzilla-tool:
+        * Scripts/modules/buildbot.py:
+        * Scripts/modules/buildbot_unittest.py:
+
+2009-10-16  Eric Seidel  <eric at webkit.org>
+
+        Reviewed by Adam Barth.
+
         run-webkit-tests fails when CWD is not inside a WebKit checkout
         https://bugs.webkit.org/show_bug.cgi?id=30451
 
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/bugzilla-tool
index ec5aa0d..6f0aaf4 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/bugzilla-tool
@@ -729,8 +729,10 @@ class LandPatchesFromCommitQueue(Command):
                 first_bug_id = patches[0]['bug_id']
                 log("%s in commit queue [%s]" % (pluralize('patch', len(patches)), ", ".join(patch_ids)))
 
-                if not tool.buildbot.core_builders_are_green():
-                    self._update_status_and_sleep("Builders (http://build.webkit.org) are red.")
+                red_builders_names = tool.buildbot.red_core_builders_names()
+                if red_builders_names:
+                    red_builders_names = map(lambda name: '"%s"' % name, red_builders_names) # Add quotes around the names.
+                    self._update_status_and_sleep("Builders [%s] are red. See http://build.webkit.org." % ", ".join(red_builders_names))
                     continue
 
                 self.status_bot.update_status("Landing patches from bug %s." % first_bug_id, bug_id=first_bug_id)
diff --git a/WebKitTools/Scripts/modules/buildbot.py b/WebKitTools/Scripts/modules/buildbot.py
index 4478429..e948d8c 100644
--- a/WebKitTools/Scripts/modules/buildbot.py
+++ b/WebKitTools/Scripts/modules/buildbot.py
@@ -83,11 +83,19 @@ class BuildBot:
                     builders.append(builder)
         return builders
 
-    def core_builders_are_green(self):
+    def red_core_builders(self):
+        red_builders = []
         for builder in self._builder_statuses_with_names_matching_regexps(self.builder_statuses(), self.core_builder_names_regexps):
             if not builder['is_green']:
-                return False
-        return True
+                red_builders.append(builder)
+        return red_builders
+
+    def red_core_builders_names(self):
+        red_builders = self.red_core_builders()
+        return map(lambda builder: builder['name'], red_builders)
+
+    def core_builders_are_green(self):
+        return not self.red_core_builders()
 
     def builder_statuses(self):
         build_status_url = self.buildbot_server_url + 'one_box_per_builder'
diff --git a/WebKitTools/Scripts/modules/buildbot_unittest.py b/WebKitTools/Scripts/modules/buildbot_unittest.py
index 461e5a2..a85f2ea 100644
--- a/WebKitTools/Scripts/modules/buildbot_unittest.py
+++ b/WebKitTools/Scripts/modules/buildbot_unittest.py
@@ -91,6 +91,22 @@ class BuildBotTest(unittest.TestCase):
             for key, expected_value in expected_parsing.items():
                 self.assertEquals(builder[key], expected_value, ("Builder %d parse failure for key: %s: Actual='%s' Expected='%s'" % (x, key, builder[key], expected_value)))
 
+    def test_core_builder_methods(self):
+        buildbot = BuildBot()
+
+        # Override builder_statuses function to not touch the network.
+        def example_builder_statuses(): # We could use instancemethod() to bind 'self' but we don't need to.
+            return BuildBotTest._expected_example_one_box_parsings
+        buildbot.builder_statuses = example_builder_statuses
+
+        buildbot.core_builder_names_regexps = [ 'Leopard', "Windows.*Build" ]
+        self.assertEquals(buildbot.red_core_builders_names(), [])
+        self.assertTrue(buildbot.core_builders_are_green())
+
+        buildbot.core_builder_names_regexps = [ 'SnowLeopard', 'Qt' ]
+        self.assertEquals(buildbot.red_core_builders_names(), [ u'SnowLeopard Intel Release', u'Qt Linux Release' ])
+        self.assertFalse(buildbot.core_builders_are_green())
+
     def test_builder_name_regexps(self):
         buildbot = BuildBot()
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list