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


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

    2010-01-03  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            commit-queue/bugzilla-tool should build both Debug and Release
            https://bugs.webkit.org/show_bug.cgi?id=28450
    
            Add a --build-style command that lets the master process tell the child
            process to build both debug and release.  Eventually we want to teach
            the test step to understand this option too, but that's a patch for
            another day.
    
            * Scripts/modules/buildsteps.py:
            * Scripts/modules/commands/queues.py:
            * Scripts/modules/webkitport.py:
            * Scripts/modules/webkitport_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52701 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index bc65eba..a9faccd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-01-03  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        commit-queue/bugzilla-tool should build both Debug and Release
+        https://bugs.webkit.org/show_bug.cgi?id=28450
+
+        Add a --build-style command that lets the master process tell the child
+        process to build both debug and release.  Eventually we want to teach
+        the test step to understand this option too, but that's a patch for
+        another day.
+
+        * Scripts/modules/buildsteps.py:
+        * Scripts/modules/commands/queues.py:
+        * Scripts/modules/webkitport.py:
+        * Scripts/modules/webkitport_unittest.py:
+
 2010-01-03  Jakub Wieczorek  <faw217 at gmail.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/modules/buildsteps.py b/WebKitTools/Scripts/modules/buildsteps.py
index f375415..1b12e32 100644
--- a/WebKitTools/Scripts/modules/buildsteps.py
+++ b/WebKitTools/Scripts/modules/buildsteps.py
@@ -74,6 +74,7 @@ class CommandOptions(object):
     update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
     local_commit = make_option("--local-commit", action="store_true", dest="local_commit", default=False, help="Make a local commit for each applied patch")
     build = make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test.")
+    build_style = make_option("--build-style", action="store", dest="build_style", default=None, help="Whether to build debug, release, or both.")
     test = make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests.")
     close_bug = make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing.")
     port = make_option("--port", action="store", dest="port", default=None, help="Specify a port (e.g., mac, qt, gtk, ...).")
@@ -407,13 +408,21 @@ class BuildStep(AbstractStep):
         return [
             CommandOptions.build,
             CommandOptions.quiet,
+            CommandOptions.build_style,
         ]
 
+    def build(self, build_style):
+        self._tool.executive.run_and_throw_if_fail(self.port().build_webkit_command(build_style=build_style), self._options.quiet)
+
     def run(self, state):
         if not self._options.build:
             return
         log("Building WebKit")
-        self._tool.executive.run_and_throw_if_fail(self.port().build_webkit_command(), self._options.quiet)
+        if self._options.build_style == "both":
+            self.build("debug")
+            self.build("release")
+        else:
+            self.build(self._options.build_style)
 
 
 class CheckStyleStep(AbstractStep):
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index 48c25fa..e14404c 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -157,7 +157,7 @@ class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
     def process_work_item(self, patch):
         try:
             self._cc_watchers(patch["bug_id"])
-            self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--quiet", patch["id"]])
+            self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--build-style=both", "--quiet", patch["id"]])
             self._did_pass(patch)
         except ScriptError, e:
             self._did_fail(patch)
diff --git a/WebKitTools/Scripts/modules/webkitport.py b/WebKitTools/Scripts/modules/webkitport.py
index a665bd3..26d9d54 100644
--- a/WebKitTools/Scripts/modules/webkitport.py
+++ b/WebKitTools/Scripts/modules/webkitport.py
@@ -32,7 +32,7 @@ import os
 
 from optparse import make_option
 
-class WebKitPort():
+class WebKitPort(object):
     # We might need to pass scm into this function for scm.checkout_root
     @classmethod
     def script_path(cls, script_name):
@@ -62,8 +62,13 @@ class WebKitPort():
         return [cls.script_path("update-webkit")]
 
     @classmethod
-    def build_webkit_command(cls):
-        return [cls.script_path("build-webkit")]
+    def build_webkit_command(cls, build_style=None):
+        command = [cls.script_path("build-webkit")]
+        if build_style == "debug":
+            command.append("--debug")
+        if build_style == "release":
+            command.append("--release")
+        return command
 
     @classmethod
     def run_webkit_tests_command(cls):
@@ -90,8 +95,8 @@ class GtkPort(WebKitPort):
         return "--port=gtk"
 
     @classmethod
-    def build_webkit_command(cls):
-        command = WebKitPort.build_webkit_command()
+    def build_webkit_command(cls, build_style=None):
+        command = WebKitPort.build_webkit_command(build_style=build_style)
         command.append("--gtk")
         return command
 
@@ -112,8 +117,8 @@ class QtPort(WebKitPort):
         return "--port=qt"
 
     @classmethod
-    def build_webkit_command(cls):
-        command = WebKitPort.build_webkit_command()
+    def build_webkit_command(cls, build_style=None):
+        command = WebKitPort.build_webkit_command(build_style=build_style)
         command.append("--qt")
         # FIXME: We should probably detect the number of cores.
         command.append('--makeargs="-j8"')
@@ -136,7 +141,7 @@ class ChromiumPort(WebKitPort):
         return command
 
     @classmethod
-    def build_webkit_command(cls):
-        command = WebKitPort.build_webkit_command()
+    def build_webkit_command(cls, build_style=None):
+        command = WebKitPort.build_webkit_command(build_style=build_style)
         command.append("--chromium")
         return command
diff --git a/WebKitTools/Scripts/modules/webkitport_unittest.py b/WebKitTools/Scripts/modules/webkitport_unittest.py
index f00edbc..3430755 100644
--- a/WebKitTools/Scripts/modules/webkitport_unittest.py
+++ b/WebKitTools/Scripts/modules/webkitport_unittest.py
@@ -37,24 +37,29 @@ class WebKitPortTest(unittest.TestCase):
         self.assertEquals(MacPort.flag(), "--port=mac")
         self.assertEquals(MacPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
         self.assertEquals(MacPort.build_webkit_command(), [WebKitPort.script_path("build-webkit")])
+        self.assertEquals(MacPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug"])
+        self.assertEquals(MacPort.build_webkit_command(build_style="release"), [WebKitPort.script_path("build-webkit"), "--release"])
 
     def test_gtk_port(self):
         self.assertEquals(GtkPort.name(), "Gtk")
         self.assertEquals(GtkPort.flag(), "--port=gtk")
         self.assertEquals(GtkPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests"), "--gtk"])
         self.assertEquals(GtkPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--gtk"])
+        self.assertEquals(GtkPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--gtk"])
 
     def test_qt_port(self):
         self.assertEquals(QtPort.name(), "Qt")
         self.assertEquals(QtPort.flag(), "--port=qt")
         self.assertEquals(QtPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
         self.assertEquals(QtPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--qt", '--makeargs="-j8"'])
+        self.assertEquals(QtPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--qt", '--makeargs="-j8"'])
 
     def test_chromium_port(self):
         self.assertEquals(ChromiumPort.name(), "Chromium")
         self.assertEquals(ChromiumPort.flag(), "--port=chromium")
         self.assertEquals(ChromiumPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
         self.assertEquals(ChromiumPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--chromium"])
+        self.assertEquals(ChromiumPort.build_webkit_command(build_style="debug"), [WebKitPort.script_path("build-webkit"), "--debug", "--chromium"])
         self.assertEquals(ChromiumPort.update_webkit_command(), [WebKitPort.script_path("update-webkit"), "--chromium"])
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list