Changeset 52240 in webkit


Ignore:
Timestamp:
Dec 16, 2009 11:41:11 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2009-12-16 Evan Martin <evan@chromium.org>

Reviewed by Adam Barth.

Add Gtk to the early warning system WebKit port list.

https://bugs.webkit.org/show_bug.cgi?id=32629

  • Scripts/modules/commands/early_warning_system.py:
  • Scripts/modules/webkitport.py:
  • Scripts/modules/webkitport_unittest.py:
Location:
trunk/WebKitTools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52239 r52240  
     12009-12-16  Evan Martin  <evan@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Add Gtk to the early warning system WebKit port list.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=32629
     8
     9        * Scripts/modules/commands/early_warning_system.py:
     10        * Scripts/modules/webkitport.py:
     11        * Scripts/modules/webkitport_unittest.py:
     12
    1132009-12-16  Eric Seidel  <eric@webkit.org>
    214
  • trunk/WebKitTools/Scripts/modules/commands/early_warning_system.py

    r52216 r52240  
    7373
    7474
     75class GtkEWS(AbstractEarlyWarningSystem):
     76    name = "gtk-ews"
     77    port_name = "gtk"
     78
     79
    7580class QtEWS(AbstractEarlyWarningSystem):
    7681    name = "qt-ews"
  • trunk/WebKitTools/Scripts/modules/webkitport.py

    r51889 r52240  
    4141    @staticmethod
    4242    def port(port_name):
    43         if port_name == "mac":
    44             return MacPort
    45         if port_name == "qt":
    46             return QtPort
    47         if port_name == "chromium":
    48             return ChromiumPort
     43        ports = {
     44            "chromium": ChromiumPort,
     45            "gtk": GtkPort,
     46            "mac": MacPort,
     47            "qt": QtPort,
     48        }
    4949        # FIXME: We should default to WinPort on Windows.
    50         return MacPort
     50        return ports.get(port_name, MacPort)
    5151
    5252    @classmethod
     
    7979    def flag(cls):
    8080        return "--port=mac"
     81
     82
     83class GtkPort(WebKitPort):
     84    @classmethod
     85    def name(cls):
     86        return "Gtk"
     87
     88    @classmethod
     89    def flag(cls):
     90        return "--port=gtk"
     91
     92    @classmethod
     93    def build_webkit_command(cls):
     94        command = WebKitPort.build_webkit_command()
     95        command.append("--gtk")
     96        return command
     97
     98    @classmethod
     99    def run_webkit_tests_command(cls):
     100        command = WebKitPort.run_webkit_tests_command()
     101        command.append("--gtk")
     102        return command
    81103
    82104
  • trunk/WebKitTools/Scripts/modules/webkitport_unittest.py

    r51730 r52240  
    3030import unittest
    3131
    32 from modules.webkitport import WebKitPort, MacPort, QtPort, ChromiumPort
     32from modules.webkitport import WebKitPort, MacPort, GtkPort, QtPort, ChromiumPort
    3333
    3434class WebKitPortTest(unittest.TestCase):
     
    3838        self.assertEquals(MacPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests")])
    3939        self.assertEquals(MacPort.build_webkit_command(), [WebKitPort.script_path("build-webkit")])
     40
     41    def test_gtk_port(self):
     42        self.assertEquals(GtkPort.name(), "Gtk")
     43        self.assertEquals(GtkPort.flag(), "--port=gtk")
     44        self.assertEquals(GtkPort.run_webkit_tests_command(), [WebKitPort.script_path("run-webkit-tests"), "--gtk"])
     45        self.assertEquals(GtkPort.build_webkit_command(), [WebKitPort.script_path("build-webkit"), "--gtk"])
    4046
    4147    def test_qt_port(self):
Note: See TracChangeset for help on using the changeset viewer.