Title: [148501] trunk/Tools
Revision
148501
Author
[email protected]
Date
2013-04-16 01:25:14 -0700 (Tue, 16 Apr 2013)

Log Message

Unreviewed, rolling out r148498.
http://trac.webkit.org/changeset/148498
https://bugs.webkit.org/show_bug.cgi?id=114669

Appears to have broken EWS (Requested by rniwa on #webkit).

* Scripts/webkitpy/common/config/ews.json: Removed.
* Scripts/webkitpy/tool/commands/__init__.py:
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem):
(AbstractEarlyWarningSystem.__init__):
(AbstractEarlyWarningSystem.handle_script_error.does):
(GtkEWS):
(GtkWK2EWS):
(EflEWS):
(QtEWS):
(QtWK2EWS):
(WinEWS):
(MacEWS):
(MacWK2EWS):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(EarlyWarningSystemTest._default_expected_logs):
(_test_ews):
(test_ewses):

Modified Paths

Removed Paths

Diff

Modified: trunk/Tools/ChangeLog (148500 => 148501)


--- trunk/Tools/ChangeLog	2013-04-16 08:15:34 UTC (rev 148500)
+++ trunk/Tools/ChangeLog	2013-04-16 08:25:14 UTC (rev 148501)
@@ -1,3 +1,30 @@
+2013-04-16  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r148498.
+        http://trac.webkit.org/changeset/148498
+        https://bugs.webkit.org/show_bug.cgi?id=114669
+
+        Appears to have broken EWS (Requested by rniwa on #webkit).
+
+        * Scripts/webkitpy/common/config/ews.json: Removed.
+        * Scripts/webkitpy/tool/commands/__init__.py:
+        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+        (AbstractEarlyWarningSystem):
+        (AbstractEarlyWarningSystem.__init__):
+        (AbstractEarlyWarningSystem.handle_script_error.does):
+        (GtkEWS):
+        (GtkWK2EWS):
+        (EflEWS):
+        (QtEWS):
+        (QtWK2EWS):
+        (WinEWS):
+        (MacEWS):
+        (MacWK2EWS):
+        * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+        (EarlyWarningSystemTest._default_expected_logs):
+        (_test_ews):
+        (test_ewses):
+
 2013-04-13  Ryosuke Niwa  <[email protected]>
 
         Isolate Early Warning System definitions into a JSON

Deleted: trunk/Tools/Scripts/webkitpy/common/config/ews.json (148500 => 148501)


--- trunk/Tools/Scripts/webkitpy/common/config/ews.json	2013-04-16 08:15:34 UTC (rev 148500)
+++ trunk/Tools/Scripts/webkitpy/common/config/ews.json	2013-04-16 08:25:14 UTC (rev 148501)
@@ -1,53 +0,0 @@
-{
-    "GTK EWS": {
-        "port": "gtk",
-        "watchers": [
-            "[email protected]"
-        ]
-    },
-    "GTK WK2 EWS": {
-        "port": "gtk-wk2",
-        "watchers": [
-            "[email protected]"
-        ]
-    },
-    "EFL EWS": {
-        "port": "efl",
-        "watchers": [
-            "[email protected]",
-            "[email protected]",
-            "[email protected]",
-            "[email protected]"
-        ]
-    },
-    "Qt EWS": {
-        "port": "qt",
-        "watchers": [
-            "[email protected]"
-        ]
-    },
-    "Qt WK2 EWS": {
-        "port": "qt",
-        "watchers": [
-            "[email protected]"
-        ]
-    },
-    "Win EWS": {
-        "port": "win",
-        "runTests": true
-    },
-    "Mac EWS": {
-        "port": "mac",
-        "watchers": [
-            "[email protected]"
-        ],
-        "runTests": true
-    },
-    "Mac WK2 EWS": {
-        "port": "mac-wk2",
-        "watchers": [
-            "[email protected]"
-        ],
-        "runTests": true
-    }
-}
\ No newline at end of file

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py (148500 => 148501)


--- trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py	2013-04-16 08:15:34 UTC (rev 148500)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py	2013-04-16 08:25:14 UTC (rev 148501)
@@ -7,7 +7,7 @@
 from webkitpy.tool.commands.bugsearch import BugSearch
 from webkitpy.tool.commands.chromechannels import ChromeChannels
 from webkitpy.tool.commands.download import *
-from webkitpy.tool.commands.earlywarningsystem import AbstractEarlyWarningSystem
+from webkitpy.tool.commands.earlywarningsystem import *
 from webkitpy.tool.commands.findusers import FindUsers
 from webkitpy.tool.commands.gardenomatic import GardenOMatic
 from webkitpy.tool.commands.newcommitbot import NewCommitBot
@@ -21,5 +21,3 @@
 from webkitpy.tool.commands.sheriffbot import *
 from webkitpy.tool.commands.upload import *
 from webkitpy.tool.commands.suggestnominations import *
-
-AbstractEarlyWarningSystem.load_ews_classes()

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (148500 => 148501)


--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2013-04-16 08:15:34 UTC (rev 148500)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py	2013-04-16 08:25:14 UTC (rev 148501)
@@ -26,13 +26,11 @@
 # (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 json
 import logging
 from optparse import make_option
 
 from webkitpy.common.config.committers import CommitterList
 from webkitpy.common.config.ports import DeprecatedPort
-from webkitpy.common.system.filesystem import FileSystem
 from webkitpy.common.system.executive import ScriptError
 from webkitpy.tool.bot.earlywarningsystemtask import EarlyWarningSystemTask, EarlyWarningSystemTaskDelegate
 from webkitpy.tool.bot.expectedfailures import ExpectedFailures
@@ -47,10 +45,10 @@
 class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDelegate):
     _build_style = "release"
     # FIXME: Switch _default_run_tests from opt-in to opt-out once more bots are ready to run tests.
-    run_tests = False
+    _default_run_tests = False
 
     def __init__(self):
-        options = [make_option("--run-tests", action="" dest="run_tests", default=self.run_tests, help="Run the Layout tests for each patch")]
+        options = [make_option("--run-tests", action="" dest="run_tests", default=self._default_run_tests, help="Run the Layout tests for each patch")]
         AbstractReviewQueue.__init__(self, options=options)
 
     def begin_work_queue(self):
@@ -137,21 +135,68 @@
         # FIXME: Why does this not exit(1) like the superclass does?
         _log.error(script_error.message_with_output())
 
-    @classmethod
-    def load_ews_classes(cls):
-        filesystem = FileSystem()
-        json_path = filesystem.join(filesystem.dirname(filesystem.path_to_module('webkitpy.common.config')), 'ews.json')
-        try:
-            ewses = json.loads(filesystem.read_text_file(json_path))
-        except ValueError:
-            return
 
-        classes = []
-        for name, config in ewses.iteritems():
-            classes.append(type(str(name.replace(' ', '')), (AbstractEarlyWarningSystem,), {
-                'name': config['port'] + '-ews',
-                'port_name': config['port'],
-                'watchers': config.get('watchers', []),
-                'run_tests': config.get('runTests', cls.run_tests),
-            }))
-        return classes
+class GtkEWS(AbstractEarlyWarningSystem):
+    name = "gtk-ews"
+    port_name = "gtk"
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]
+
+
+class GtkWK2EWS(AbstractEarlyWarningSystem):
+    name = "gtk-wk2-ews"
+    port_name = "gtk-wk2"
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]
+
+
+class EflEWS(AbstractEarlyWarningSystem):
+    name = "efl-ews"
+    port_name = "efl"
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+        "[email protected]",
+        "[email protected]",
+        "[email protected]",
+    ]
+
+
+class QtEWS(AbstractEarlyWarningSystem):
+    name = "qt-ews"
+    port_name = "qt"
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]
+
+
+class QtWK2EWS(AbstractEarlyWarningSystem):
+    name = "qt-wk2-ews"
+    port_name = "qt"
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]
+
+
+class WinEWS(AbstractEarlyWarningSystem):
+    name = "win-ews"
+    port_name = "win"
+    _default_run_tests = True
+
+class MacEWS(AbstractEarlyWarningSystem):
+    name = "mac-ews"
+    port_name = "mac"
+    _default_run_tests = True
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]
+
+
+class MacWK2EWS(AbstractEarlyWarningSystem):
+    name = "mac-wk2-ews"
+    port_name = "mac-wk2"
+    _default_run_tests = True
+    watchers = AbstractEarlyWarningSystem.watchers + [
+        "[email protected]",
+    ]

Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py (148500 => 148501)


--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py	2013-04-16 08:15:34 UTC (rev 148500)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py	2013-04-16 08:25:14 UTC (rev 148501)
@@ -56,7 +56,7 @@
             "name": ews.name,
             "port": ews.port_name,
         }
-        if ews.run_tests:
+        if ews._default_run_tests:
             run_tests_line = "Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=%(port)s\n" % string_replacements
         else:
             run_tests_line = ""
@@ -80,12 +80,13 @@
         ews.bind_to_tool(MockTool())
         options = Mock()
         options.port = None
-        options.run_tests = ews.run_tests
+        options.run_tests = ews._default_run_tests
         self.assert_queue_outputs(ews, expected_logs=self._default_expected_logs(ews), options=options)
 
     def test_ewses(self):
-        classes = AbstractEarlyWarningSystem.load_ews_classes()
-        self.assertTrue(classes)
-        self.maxDiff = None
-        for ews_class in classes:
-            self._test_ews(ews_class())
+        self._test_ews(MacEWS())
+        self._test_ews(MacWK2EWS())
+        self._test_ews(QtEWS())
+        self._test_ews(QtWK2EWS())
+        self._test_ews(GtkEWS())
+        self._test_ews(EflEWS())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to