Changeset 51253 in webkit


Ignore:
Timestamp:
Nov 20, 2009 1:03:12 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2009-11-20 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Pass the port information to the child process
https://bugs.webkit.org/show_bug.cgi?id=31736

We need to do this so the child process knows what to build!

  • Scripts/bugzilla-tool:
  • Scripts/modules/landingsequence.py:
  • Scripts/modules/webkitport.py:
  • Scripts/modules/webkitport_unittest.py:
Location:
trunk/WebKitTools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51249 r51253  
     12009-11-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Pass the port information to the child process
     6        https://bugs.webkit.org/show_bug.cgi?id=31736
     7
     8        We need to do this so the child process knows what to build!
     9
     10        * Scripts/bugzilla-tool:
     11        * Scripts/modules/landingsequence.py:
     12        * Scripts/modules/webkitport.py:
     13        * Scripts/modules/webkitport_unittest.py:
     14
    1152009-11-20  Adam Barth  <abarth@webkit.org>
    216
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r51249 r51253  
    762762        AbstractTryQueue.__init__(self, options)
    763763
     764    def begin_work_queue(self):
     765        AbstractTryQueue.begin_work_queue(self)
     766        self.port = WebKitPort.port(self.options)
     767
    764768    def should_proceed_with_work_item(self, patch):
    765769        # FIXME: We should check whether we're currently able to build!
     
    767771
    768772    def process_work_item(self, patch):
    769         self.run_bugzilla_tool(["build-attachment", "--force-clean", patch["id"]])
     773        self.run_bugzilla_tool(["build-attachment", self.port.flag(), "--force-clean", patch["id"]])
    770774
    771775
  • trunk/WebKitTools/Scripts/modules/landingsequence.py

    r51243 r51253  
    4141        self._options = options
    4242        self._tool = tool
    43         self._port = WebKitPort.get_port(self._options)
     43        self._port = WebKitPort.port(self._options)
    4444
    4545    def run(self):
  • trunk/WebKitTools/Scripts/modules/webkitport.py

    r51231 r51253  
    4242    def port_options():
    4343        return [
    44             make_option("--qt", action="store_true", dest="qt", default=False, help="Use the Qt port."),
     44            make_option("--port", action="store", dest="port", default=None, help="Specify a port (e.g., mac, qt, gtk, ...)."),
    4545        ]
    4646
    4747    @staticmethod
    48     def get_port(options):
    49         if options.qt:
     48    def port(options):
     49        if options.port == "mac":
     50            return MacPort
     51        if options.port == "qt":
    5052            return QtPort
     53        # FIXME: We should default to WinPort on Windows.
    5154        return MacPort
    5255
    5356    @classmethod
    5457    def name(cls):
     58        raise NotImplementedError, "subclasses must implement"
     59
     60    @classmethod
     61    def flag(cls):
    5562        raise NotImplementedError, "subclasses must implement"
    5663
     
    6976        return "Mac"
    7077
     78    @classmethod
     79    def flag(cls):
     80        return "--port=mac"
     81
    7182
    7283class QtPort(WebKitPort):
     
    7687
    7788    @classmethod
     89    def flag(cls):
     90        return "--port=qt"
     91
     92    @classmethod
    7893    def build_webkit_command(cls):
    7994        command = WebKitPort.build_webkit_command()
  • trunk/WebKitTools/Scripts/modules/webkitport_unittest.py

    r51231 r51253  
    3535    def test_mac_port(self):
    3636        self.assertEquals(MacPort.name(), "Mac")
     37        self.assertEquals(MacPort.flag(), "--port=mac")
    3738        self.assertEquals(MacPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
    3839        self.assertEquals(MacPort.build_webkit_command(), [WebKitPort.script_path("build-webkit")])
     
    4041    def test_qt_port(self):
    4142        self.assertEquals(QtPort.name(), "Qt")
     43        self.assertEquals(QtPort.flag(), "--port=qt")
    4244        self.assertEquals(QtPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
    4345        self.assertEquals(QtPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--qt"])
Note: See TracChangeset for help on using the changeset viewer.