Changeset 51231 in webkit
- Timestamp:
- Nov 19, 2009 10:43:40 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r51230 r51231 1 2009-11-19 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Support Qt port in bugzilla-tool 6 https://bugs.webkit.org/show_bug.cgi?id=31701 7 8 Now we support building with Qt! 9 10 * Scripts/bugzilla-tool: 11 * Scripts/modules/webkitport.py: Added. 12 * Scripts/modules/webkitport_unittest.py: Added. 13 * Scripts/run-webkit-unittests: 14 1 15 2009-11-19 Zoltan Horvath <zoltan@webkit.org> 2 16 -
trunk/WebKitTools/Scripts/bugzilla-tool
r51223 r51231 51 51 from modules.scm import CommitMessage, detect_scm_system, ScriptError, CheckoutNeedsUpdate 52 52 from modules.statusbot import StatusBot 53 from modules.webkitport import WebKitPort 53 54 from modules.workqueue import WorkQueue, WorkQueueDelegate 54 55 … … 214 215 make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output."), 215 216 make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible."), 216 ] 217 ] + WebKitPort.port_options() 217 218 218 219 @staticmethod … … 245 246 raise ScriptError(script_args=args, exit_code=exit_code, output=child_output) 246 247 247 # We might need to pass scm into this function for scm.checkout_root248 @staticmethod249 def webkit_script_path(script_name):250 return os.path.join("WebKitTools", "Scripts", script_name)251 252 248 @classmethod 253 def run_webkit_script(cls, script_name, quiet=False ):249 def run_webkit_script(cls, script_name, quiet=False, port=WebKitPort): 254 250 log("Running %s" % script_name) 255 cls.run_and_throw_if_fail( cls.webkit_script_path(script_name), quiet)251 cls.run_and_throw_if_fail(port.script_path(script_name), quiet) 256 252 257 253 @classmethod 258 def build_webkit(cls, quiet=False): 259 cls.run_webkit_script("build-webkit", quiet) 254 def build_webkit(cls, quiet=False, port=WebKitPort): 255 log("Building WebKit") 256 cls.run_and_throw_if_fail(port.build_webkit_command(), quiet) 260 257 261 258 @staticmethod … … 266 263 267 264 @classmethod 268 def run_webkit_tests(cls, launch_safari, fail_fast=False, quiet=False ):269 args = [cls.webkit_script_path("run-webkit-tests")]265 def run_webkit_tests(cls, launch_safari, fail_fast=False, quiet=False, port=WebKitPort): 266 args = port.run_webkit_tests_command() 270 267 if not launch_safari: 271 268 args.append("--no-launch-safari") … … 286 283 @classmethod 287 284 def build_and_commit(cls, scm, options): 285 port = WebKitPort.get_port(options) 288 286 if options.build: 289 cls.build_webkit(quiet=options.quiet )287 cls.build_webkit(quiet=options.quiet, port=port) 290 288 if options.test: 291 289 # When running the commit-queue we don't want to launch Safari and we want to exit after the first failure. 292 cls.run_webkit_tests(launch_safari=not options.non_interactive, fail_fast=options.non_interactive, quiet=options.quiet )290 cls.run_webkit_tests(launch_safari=not options.non_interactive, fail_fast=options.non_interactive, quiet=options.quiet, port=port) 293 291 commit_message = commit_message_for_this_commit(scm) 294 292 commit_log = scm.commit_with_message(commit_message.message()) -
trunk/WebKitTools/Scripts/modules/webkitport.py
- Property svn:executable deleted
r51230 r51231 1 #!/usr/bin/env python 2 # Copyright (c) 2009 Google Inc. All rights reserved. 3 # 1 # Copyright (C) 2009, Google Inc. All rights reserved. 2 # 4 3 # Redistribution and use in source and binary forms, with or without 5 4 # modification, are permitted provided that the following conditions are … … 27 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # 29 # WebKit's Python module for understanding the various ports 29 30 30 import unittest31 import os 31 32 32 from modules.bugzilla_unittest import * 33 from modules.buildbot_unittest import * 34 from modules.changelogs_unittest import * 35 from modules.committers_unittest import * 36 from modules.cpp_style_unittest import * 37 from modules.diff_parser_unittest import * 38 from modules.logging_unittest import * 39 from modules.multicommandtool_unittest import * 40 from modules.patchcollection_unittest import * 41 from modules.scm_unittest import * 42 from modules.workqueue_unittest import * 33 from optparse import make_option 43 34 44 if __name__ == "__main__": 45 unittest.main() 35 class WebKitPort(): 36 # We might need to pass scm into this function for scm.checkout_root 37 @classmethod 38 def script_path(cls, script_name): 39 return os.path.join("WebKitTools", "Scripts", script_name) 40 41 @staticmethod 42 def port_options(): 43 return [ 44 make_option("--qt", action="store_true", dest="qt", default=False, help="Use the Qt port."), 45 ] 46 47 @staticmethod 48 def get_port(options): 49 if options.qt: 50 return QtPort 51 return MacPort 52 53 @classmethod 54 def name(cls): 55 raise NotImplementedError, "subclasses must implement" 56 57 @classmethod 58 def run_webkit_tests_command(cls): 59 return [cls.script_path("run-webkit-tests")] 60 61 @classmethod 62 def build_webkit_command(cls): 63 return [cls.script_path("build-webkit")] 64 65 66 class MacPort(WebKitPort): 67 @classmethod 68 def name(cls): 69 return "Mac" 70 71 72 class QtPort(WebKitPort): 73 @classmethod 74 def name(cls): 75 return "Qt" 76 77 @classmethod 78 def build_webkit_command(cls): 79 command = WebKitPort.build_webkit_command() 80 command.append("--qt") 81 return command -
trunk/WebKitTools/Scripts/modules/webkitport_unittest.py
- Property svn:executable deleted
r51230 r51231 1 1 #!/usr/bin/env python 2 # Copyright (c) 2009 Google Inc. All rights reserved.2 # Copyright (c) 2009, Google Inc. All rights reserved. 3 3 # 4 4 # Redistribution and use in source and binary forms, with or without … … 30 30 import unittest 31 31 32 from modules.bugzilla_unittest import * 33 from modules.buildbot_unittest import * 34 from modules.changelogs_unittest import * 35 from modules.committers_unittest import * 36 from modules.cpp_style_unittest import * 37 from modules.diff_parser_unittest import * 38 from modules.logging_unittest import * 39 from modules.multicommandtool_unittest import * 40 from modules.patchcollection_unittest import * 41 from modules.scm_unittest import * 42 from modules.workqueue_unittest import * 32 from modules.webkitport import WebKitPort, MacPort, QtPort 43 33 44 if __name__ == "__main__": 34 class WebKitPortTest(unittest.TestCase): 35 def test_mac_port(self): 36 self.assertEquals(MacPort.name(), "Mac") 37 self.assertEquals(MacPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")]) 38 self.assertEquals(MacPort.build_webkit_command(), [WebKitPort.script_path("build-webkit")]) 39 40 def test_qt_port(self): 41 self.assertEquals(QtPort.name(), "Qt") 42 self.assertEquals(QtPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")]) 43 self.assertEquals(QtPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--qt"]) 44 45 46 if __name__ == '__main__': 45 47 unittest.main() -
trunk/WebKitTools/Scripts/run-webkit-unittests
r51223 r51231 40 40 from modules.patchcollection_unittest import * 41 41 from modules.scm_unittest import * 42 from modules.webkitport_unittest import * 42 43 from modules.workqueue_unittest import * 43 44
Note: See TracChangeset
for help on using the changeset viewer.