[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:40:59 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 85cbf22cdd3fdc87a05ff88a3097173e1e8fc0ee
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 20 06:43:40 2009 +0000
2009-11-19 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Support Qt port in bugzilla-tool
https://bugs.webkit.org/show_bug.cgi?id=31701
Now we support building with Qt!
* Scripts/bugzilla-tool:
* Scripts/modules/webkitport.py: Added.
* Scripts/modules/webkitport_unittest.py: Added.
* Scripts/run-webkit-unittests:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 87bb496..b1d2089 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-19 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Support Qt port in bugzilla-tool
+ https://bugs.webkit.org/show_bug.cgi?id=31701
+
+ Now we support building with Qt!
+
+ * Scripts/bugzilla-tool:
+ * Scripts/modules/webkitport.py: Added.
+ * Scripts/modules/webkitport_unittest.py: Added.
+ * Scripts/run-webkit-unittests:
+
2009-11-19 Zoltan Horvath <zoltan at webkit.org>
Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/bugzilla-tool
index ce2a78d..fe34945 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/bugzilla-tool
@@ -50,6 +50,7 @@ from modules.multicommandtool import MultiCommandTool, Command
from modules.patchcollection import PatchCollection
from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate
from modules.statusbot import StatusBot
+from modules.webkitport import WebKitPort
from modules.workqueue import WorkQueue, WorkQueueDelegate
@@ -213,7 +214,7 @@ class WebKitLandingScripts:
make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests."),
make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output."),
make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible."),
- ]
+ ] + WebKitPort.port_options()
@staticmethod
def run_command_with_teed_output(args, teed_output):
@@ -244,19 +245,15 @@ class WebKitLandingScripts:
if exit_code:
raise ScriptError(script_args=args, exit_code=exit_code, output=child_output)
- # We might need to pass scm into this function for scm.checkout_root
- @staticmethod
- def webkit_script_path(script_name):
- return os.path.join("WebKitTools", "Scripts", script_name)
-
@classmethod
- def run_webkit_script(cls, script_name, quiet=False):
+ def run_webkit_script(cls, script_name, quiet=False, port=WebKitPort):
log("Running %s" % script_name)
- cls.run_and_throw_if_fail(cls.webkit_script_path(script_name), quiet)
+ cls.run_and_throw_if_fail(port.script_path(script_name), quiet)
@classmethod
- def build_webkit(cls, quiet=False):
- cls.run_webkit_script("build-webkit", quiet)
+ def build_webkit(cls, quiet=False, port=WebKitPort):
+ log("Building WebKit")
+ cls.run_and_throw_if_fail(port.build_webkit_command(), quiet)
@staticmethod
def ensure_builders_are_green(buildbot, options):
@@ -265,8 +262,8 @@ class WebKitLandingScripts:
error("Builders at %s are red, please do not commit. Pass --ignore-builders to bypass this check." % (buildbot.buildbot_host))
@classmethod
- def run_webkit_tests(cls, launch_safari, fail_fast=False, quiet=False):
- args = [cls.webkit_script_path("run-webkit-tests")]
+ def run_webkit_tests(cls, launch_safari, fail_fast=False, quiet=False, port=WebKitPort):
+ args = port.run_webkit_tests_command()
if not launch_safari:
args.append("--no-launch-safari")
if quiet:
@@ -285,11 +282,12 @@ class WebKitLandingScripts:
@classmethod
def build_and_commit(cls, scm, options):
+ port = WebKitPort.get_port(options)
if options.build:
- cls.build_webkit(quiet=options.quiet)
+ cls.build_webkit(quiet=options.quiet, port=port)
if options.test:
# When running the commit-queue we don't want to launch Safari and we want to exit after the first failure.
- cls.run_webkit_tests(launch_safari=not options.non_interactive, fail_fast=options.non_interactive, quiet=options.quiet)
+ cls.run_webkit_tests(launch_safari=not options.non_interactive, fail_fast=options.non_interactive, quiet=options.quiet, port=port)
commit_message = commit_message_for_this_commit(scm)
commit_log = scm.commit_with_message(commit_message.message())
return bug_comment_from_commit_text(scm, commit_log)
diff --git a/WebKitTools/Scripts/modules/webkitport.py b/WebKitTools/Scripts/modules/webkitport.py
new file mode 100644
index 0000000..ae7050b
--- /dev/null
+++ b/WebKitTools/Scripts/modules/webkitport.py
@@ -0,0 +1,81 @@
+# Copyright (C) 2009, Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# WebKit's Python module for understanding the various ports
+
+import os
+
+from optparse import make_option
+
+class WebKitPort():
+ # We might need to pass scm into this function for scm.checkout_root
+ @classmethod
+ def script_path(cls, script_name):
+ return os.path.join("WebKitTools", "Scripts", script_name)
+
+ @staticmethod
+ def port_options():
+ return [
+ make_option("--qt", action="store_true", dest="qt", default=False, help="Use the Qt port."),
+ ]
+
+ @staticmethod
+ def get_port(options):
+ if options.qt:
+ return QtPort
+ return MacPort
+
+ @classmethod
+ def name(cls):
+ raise NotImplementedError, "subclasses must implement"
+
+ @classmethod
+ def run_webkit_tests_command(cls):
+ return [cls.script_path("run-webkit-tests")]
+
+ @classmethod
+ def build_webkit_command(cls):
+ return [cls.script_path("build-webkit")]
+
+
+class MacPort(WebKitPort):
+ @classmethod
+ def name(cls):
+ return "Mac"
+
+
+class QtPort(WebKitPort):
+ @classmethod
+ def name(cls):
+ return "Qt"
+
+ @classmethod
+ def build_webkit_command(cls):
+ command = WebKitPort.build_webkit_command()
+ command.append("--qt")
+ return command
diff --git a/WebKitTools/Scripts/modules/webkitport_unittest.py b/WebKitTools/Scripts/modules/webkitport_unittest.py
new file mode 100644
index 0000000..4cf68e3
--- /dev/null
+++ b/WebKitTools/Scripts/modules/webkitport_unittest.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+# Copyright (c) 2009, Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import unittest
+
+from modules.webkitport import WebKitPort, MacPort, QtPort
+
+class WebKitPortTest(unittest.TestCase):
+ def test_mac_port(self):
+ self.assertEquals(MacPort.name(), "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")])
+
+ def test_qt_port(self):
+ self.assertEquals(QtPort.name(), "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"])
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/WebKitTools/Scripts/run-webkit-unittests b/WebKitTools/Scripts/run-webkit-unittests
index 99e2d08..7c54944 100755
--- a/WebKitTools/Scripts/run-webkit-unittests
+++ b/WebKitTools/Scripts/run-webkit-unittests
@@ -39,6 +39,7 @@ from modules.logging_unittest import *
from modules.multicommandtool_unittest import *
from modules.patchcollection_unittest import *
from modules.scm_unittest import *
+from modules.webkitport_unittest import *
from modules.workqueue_unittest import *
if __name__ == "__main__":
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list