<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[224547] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/224547">224547</a></dd>
<dt>Author</dt> <dd>aakash_jain@apple.com</dd>
<dt>Date</dt> <dd>2017-11-07 14:30:57 -0800 (Tue, 07 Nov 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add support for webkitpy tests EWS
https://bugs.webkit.org/show_bug.cgi?id=178480

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/common/config/ews.json: Added webkitpy EWS.
* Scripts/webkitpy/common/net/generictestresults.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults.py.
* Scripts/webkitpy/common/net/generictestresults_unittest.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults_unittest.py.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchAnalysisTask._test_patch): Do not retry webkitpy test since they are not flaky.
* Scripts/webkitpy/tool/bot/bindingstestresultsreader.py: Updated import for BindingsTestResult.
* Scripts/webkitpy/tool/bot/retrylogic_unittest.py: Ditto.
* Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py: Copied from Scripts/webkitpy/tool/bot/bindingstestresultsreader.py.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.begin_work_queue): Added webkitpy test result reader.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Updated unit-tests.
* Scripts/webkitpy/tool/steps/checkpatchrelevance.py: Run webkitpy EWS only for relevant changes.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.run): Run webkitpy tests when --group=webkitpy is passed.
(RunTests._run_webkitpy_tests): Method to invoke webkitpy tests.
* Scripts/webkitpy/tool/steps/steps_unittest.py:
(test_runtests_webkitpy): Added unit-test.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonconfigewsjson">trunk/Tools/Scripts/webkitpy/common/config/ews.json</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotbindingstestresultsreaderpy">trunk/Tools/Scripts/webkitpy/tool/bot/bindingstestresultsreader.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotpatchanalysistaskpy">trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotretrylogic_unittestpy">trunk/Tools/Scripts/webkitpy/tool/bot/retrylogic_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy">trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolcommandsearlywarningsystem_unittestpy">trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepscheckpatchrelevancepy">trunk/Tools/Scripts/webkitpy/tool/steps/checkpatchrelevance.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepsruntestspy">trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolstepssteps_unittestpy">trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsScriptswebkitpycommonnetgenerictestresultspy">trunk/Tools/Scripts/webkitpy/common/net/generictestresults.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonnetgenerictestresults_unittestpy">trunk/Tools/Scripts/webkitpy/common/net/generictestresults_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpytoolbotwebkitpytestresultsreaderpy">trunk/Tools/Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsScriptswebkitpycommonnetbindingstestresultspy">trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults.py</a></li>
<li><a href="#trunkToolsScriptswebkitpycommonnetbindingstestresults_unittestpy">trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults_unittest.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/ChangeLog       2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2017-11-07  Aakash Jain  <aakash_jain@apple.com>
+
+        Add support for webkitpy tests EWS
+        https://bugs.webkit.org/show_bug.cgi?id=178480
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/common/config/ews.json: Added webkitpy EWS.
+        * Scripts/webkitpy/common/net/generictestresults.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults.py.
+        * Scripts/webkitpy/common/net/generictestresults_unittest.py: Renamed from Scripts/webkitpy/common/net/bindingstestresults_unittest.py.
+        * Scripts/webkitpy/tool/bot/patchanalysistask.py:
+        (PatchAnalysisTask._test_patch): Do not retry webkitpy test since they are not flaky.
+        * Scripts/webkitpy/tool/bot/bindingstestresultsreader.py: Updated import for BindingsTestResult.
+        * Scripts/webkitpy/tool/bot/retrylogic_unittest.py: Ditto.
+        * Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py: Copied from Scripts/webkitpy/tool/bot/bindingstestresultsreader.py.
+        * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+        (AbstractEarlyWarningSystem.begin_work_queue): Added webkitpy test result reader.
+        * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py: Updated unit-tests.
+        * Scripts/webkitpy/tool/steps/checkpatchrelevance.py: Run webkitpy EWS only for relevant changes.
+        * Scripts/webkitpy/tool/steps/runtests.py:
+        (RunTests.run): Run webkitpy tests when --group=webkitpy is passed.
+        (RunTests._run_webkitpy_tests): Method to invoke webkitpy tests.
+        * Scripts/webkitpy/tool/steps/steps_unittest.py:
+        (test_runtests_webkitpy): Added unit-test.
+
</ins><span class="cx"> 2017-11-07  Commit Queue  <commit-queue@webkit.org>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r224512 and r224521.
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonconfigewsjson"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/common/config/ews.json (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/config/ews.json      2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/common/config/ews.json 2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -59,6 +59,13 @@
</span><span class="cx">         "runTests": true,
</span><span class="cx">         "shouldBuild": false
</span><span class="cx">     },
</span><ins>+    "webkitpy EWS": {
+        "port": "mac",
+        "name": "webkitpy-ews",
+        "group": "webkitpy",
+        "runTests": true,
+        "shouldBuild": false
+    },
</ins><span class="cx">     "WPE EWS": {
</span><span class="cx">         "port": "wpe",
</span><span class="cx">         "watchers": [
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonnetbindingstestresultspy"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults.py   2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults.py      2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -1,59 +0,0 @@
</span><del>-# Copyright (C) 2017 Apple 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:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  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.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 logging
-
-from webkitpy.common.net.abstracttestresults import AbstractTestResults
-
-_log = logging.getLogger(__name__)
-
-
-class BindingsTestResults(AbstractTestResults):
-    def __init__(self, failures):
-        self._failures = failures
-
-    @classmethod
-    def results_from_string(cls, string):
-        parsed_results = cls.parse_json_string(string)
-        if not parsed_results:
-            return None
-
-        if 'failures' not in parsed_results:
-            return None
-
-        return cls(parsed_results['failures'])
-
-    def is_subset(self, other):
-        return set(self._failures) <= set(other._failures)
-
-    def equals(self, other):
-        return set(self._failures) == set(other._failures)
-
-    def all_passed(self):
-        return not self._failures
-
-    def failing_tests(self):
-        return self._failures
-
-    # No defined failure limit for bindings tests.
-    def did_exceed_test_failure_limit(self):
-        return False
</del></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonnetbindingstestresults_unittestpy"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults_unittest.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults_unittest.py  2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults_unittest.py     2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -1,41 +0,0 @@
</span><del>-# Copyright (C) 2017 Apple 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:
-# 1.  Redistributions of source code must retain the above copyright
-#     notice, this list of conditions and the following disclaimer.
-# 2.  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.
-#
-# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 webkitpy.common.net.bindingstestresults import BindingsTestResults
-
-
-class BindingsTestResultsTest(unittest.TestCase):
-    def test_results_from_string(self):
-        incomplete_json = '{"key2": []}'
-        self.assertEqual(None, BindingsTestResults.results_from_string(incomplete_json))
-
-    def test_results_from_string_success(self):
-        no_failures_string = '{"failures": []}'
-        no_failures_results = BindingsTestResults([])
-        self.assertTrue(no_failures_results.equals(BindingsTestResults.results_from_string(no_failures_string)))
-        self.assertTrue(no_failures_results.all_passed())
-
-        test_string = '{"failures": ["failure1"]}'
-        test_results = BindingsTestResults(["failure1"])
-        self.assertTrue(test_results.equals(BindingsTestResults.results_from_string(test_string)))
</del></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonnetgenerictestresultspyfromrev224546trunkToolsScriptswebkitpycommonnetbindingstestresultspy"></a>
<div class="copfile"><h4>Copied: trunk/Tools/Scripts/webkitpy/common/net/generictestresults.py (from rev 224546, trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults.py) (0 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/net/generictestresults.py                            (rev 0)
+++ trunk/Tools/Scripts/webkitpy/common/net/generictestresults.py       2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -0,0 +1,67 @@
</span><ins>+# Copyright (C) 2017 Apple 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:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 logging
+
+from webkitpy.common.net.abstracttestresults import AbstractTestResults
+
+_log = logging.getLogger(__name__)
+
+
+class GenericTestResults(AbstractTestResults):
+    def __init__(self, failures):
+        self._failures = failures
+
+    @classmethod
+    def results_from_string(cls, string):
+        parsed_results = cls.parse_json_string(string)
+        if not parsed_results:
+            return None
+
+        if 'failures' not in parsed_results:
+            return None
+
+        return cls(parsed_results['failures'])
+
+    def is_subset(self, other):
+        return set(self._failures) <= set(other._failures)
+
+    def equals(self, other):
+        return set(self._failures) == set(other._failures)
+
+    def all_passed(self):
+        return not self._failures
+
+    def failing_tests(self):
+        return self._failures
+
+    # No defined failure limit for bindings tests.
+    def did_exceed_test_failure_limit(self):
+        return False
+
+
+class BindingsTestResults(GenericTestResults):
+    pass
+
+
+class WebkitpyTestResults(GenericTestResults):
+    pass
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpycommonnetgenerictestresults_unittestpyfromrev224546trunkToolsScriptswebkitpycommonnetbindingstestresults_unittestpy"></a>
<div class="copfile"><h4>Copied: trunk/Tools/Scripts/webkitpy/common/net/generictestresults_unittest.py (from rev 224546, trunk/Tools/Scripts/webkitpy/common/net/bindingstestresults_unittest.py) (0 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/common/net/generictestresults_unittest.py                           (rev 0)
+++ trunk/Tools/Scripts/webkitpy/common/net/generictestresults_unittest.py      2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+# Copyright (C) 2017 Apple 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:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 webkitpy.common.net.generictestresults import GenericTestResults
+
+
+class GenericTestResultsTest(unittest.TestCase):
+    def test_results_from_string(self):
+        incomplete_json = '{"key2": []}'
+        self.assertEqual(None, GenericTestResults.results_from_string(incomplete_json))
+
+    def test_results_from_string_success(self):
+        no_failures_string = '{"failures": []}'
+        no_failures_results = GenericTestResults([])
+        self.assertTrue(no_failures_results.equals(GenericTestResults.results_from_string(no_failures_string)))
+        self.assertTrue(no_failures_results.all_passed())
+
+        test_string = '{"failures": ["failure1"]}'
+        test_results = GenericTestResults(["failure1"])
+        self.assertTrue(test_results.equals(GenericTestResults.results_from_string(test_string)))
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotbindingstestresultsreaderpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bot/bindingstestresultsreader.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/bindingstestresultsreader.py       2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/bindingstestresultsreader.py  2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -22,7 +22,7 @@
</span><span class="cx"> 
</span><span class="cx"> import logging
</span><span class="cx"> 
</span><del>-from webkitpy.common.net.bindingstestresults import BindingsTestResults
</del><ins>+from webkitpy.common.net.generictestresults import BindingsTestResults
</ins><span class="cx"> from webkitpy.tool.bot.abstracttestresultsreader import AbstractTestResultsReader
</span><span class="cx"> 
</span><span class="cx"> _log = logging.getLogger(__name__)
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotpatchanalysistaskpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py       2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py  2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -368,6 +368,8 @@
</span><span class="cx">             return self._retry_jsc_tests()
</span><span class="cx">         elif hasattr(self._delegate, 'group') and self._delegate.group() == "bindings":
</span><span class="cx">             return self._retry_bindings_tests()
</span><ins>+        elif hasattr(self._delegate, 'group') and self._delegate.group() == "webkitpy":
+            return False
</ins><span class="cx">         else:
</span><span class="cx">             return self._retry_layout_tests()
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotretrylogic_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/bot/retrylogic_unittest.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/retrylogic_unittest.py     2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/retrylogic_unittest.py        2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> import logging
</span><span class="cx"> import unittest
</span><span class="cx"> 
</span><del>-from webkitpy.common.net.bindingstestresults import BindingsTestResults
</del><ins>+from webkitpy.common.net.generictestresults import BindingsTestResults
</ins><span class="cx"> from webkitpy.common.net.jsctestresults import JSCTestResults
</span><span class="cx"> from webkitpy.common.system.executive import ScriptError
</span><span class="cx"> from webkitpy.tool.bot.patchanalysistask import *
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolbotwebkitpytestresultsreaderpyfromrev224546trunkToolsScriptswebkitpytoolbotbindingstestresultsreaderpy"></a>
<div class="copfile"><h4>Copied: trunk/Tools/Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py (from rev 224546, trunk/Tools/Scripts/webkitpy/tool/bot/bindingstestresultsreader.py) (0 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py                               (rev 0)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/webkitpytestresultsreader.py  2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -0,0 +1,35 @@
</span><ins>+# Copyright (C) 2017 Apple 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:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  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.
+#
+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 logging
+
+from webkitpy.common.net.generictestresults import WebkitpyTestResults
+from webkitpy.tool.bot.abstracttestresultsreader import AbstractTestResultsReader
+
+_log = logging.getLogger(__name__)
+
+
+class WebkitpyTestResultsReader(AbstractTestResultsReader):
+    def results(self):
+        results_path = self._host.filesystem.join(self._results_directory, 'webkitpy_test_results.json')
+        contents = self._read_file_contents(results_path)
+        return WebkitpyTestResults.results_from_string(contents)
</ins></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystempy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py 2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py    2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> from webkitpy.tool.bot.earlywarningsystemtask import EarlyWarningSystemTask, EarlyWarningSystemTaskDelegate
</span><span class="cx"> from webkitpy.tool.bot.bindingstestresultsreader import BindingsTestResultsReader
</span><span class="cx"> from webkitpy.tool.bot.layouttestresultsreader import LayoutTestResultsReader
</span><ins>+from webkitpy.tool.bot.webkitpytestresultsreader import WebkitpyTestResultsReader
</ins><span class="cx"> from webkitpy.tool.bot.jsctestresultsreader import JSCTestResultsReader
</span><span class="cx"> from webkitpy.tool.bot.patchanalysistask import UnableToApplyPatch, PatchIsNotValid, PatchIsNotApplicable
</span><span class="cx"> from webkitpy.tool.bot.queueengine import QueueEngine
</span><span class="lines">@@ -62,6 +63,8 @@
</span><span class="cx">             self._test_results_reader = JSCTestResultsReader(self._tool, self._port.jsc_results_directory())
</span><span class="cx">         elif self.group() == "bindings":
</span><span class="cx">             self._test_results_reader = BindingsTestResultsReader(self._tool, self._port.jsc_results_directory())
</span><ins>+        elif self.group() == "webkitpy":
+            self._test_results_reader = WebkitpyTestResultsReader(self._tool, self._port.python_unittest_results_directory())
</ins><span class="cx">         else:
</span><span class="cx">             self._test_results_reader = LayoutTestResultsReader(self._tool, self._port.results_directory(), self._log_directory())
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolcommandsearlywarningsystem_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py        2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py   2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -30,7 +30,8 @@
</span><span class="cx"> from webkitpy.thirdparty.mock import Mock
</span><span class="cx"> from webkitpy.common.host import Host
</span><span class="cx"> from webkitpy.common.host_mock import MockHost
</span><del>-from webkitpy.common.net.bindingstestresults import BindingsTestResults
</del><ins>+from webkitpy.common.net.generictestresults import BindingsTestResults
+from webkitpy.common.net.generictestresults import WebkitpyTestResults
</ins><span class="cx"> from webkitpy.common.net.jsctestresults import JSCTestResults
</span><span class="cx"> from webkitpy.common.net.layouttestresults import LayoutTestResults
</span><span class="cx"> from webkitpy.common.system.outputcapture import OutputCapture
</span><span class="lines">@@ -63,6 +64,12 @@
</span><span class="cx">     _group = "bindings"
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+class TestWebkitpyEWS(AbstractEarlyWarningSystem):
+    port_name = "mac"
+    _build_style = None
+    _group = "webkitpy"
+
+
</ins><span class="cx"> class AbstractEarlyWarningSystemTest(QueuesTest):
</span><span class="cx">     def _test_message(self, ews, results, message):
</span><span class="cx">         ews.bind_to_tool(MockTool())
</span><span class="lines">@@ -94,7 +101,13 @@
</span><span class="cx">         message = "New failing tests:\n(JS) TestMapLike.idl\n(JS) TestNode.idl"
</span><span class="cx">         self._test_message(ews, results, message)
</span><span class="cx"> 
</span><ins>+    def test_failing_webkitpy_tests_message(self):
+        ews = TestWebkitpyEWS()
+        results = lambda a: WebkitpyTestResults(["webkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ews_name"])
+        message = "New failing tests:\nwebkitpy.tool.commands.earlywarningsystem_unittest.EarlyWarningSystemTest.test_ews_name"
+        self._test_message(ews, results, message)
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> class MockEarlyWarningSystemTaskForInconclusiveJSCResults(EarlyWarningSystemTask):
</span><span class="cx">     def _test_patch(self):
</span><span class="cx">         self._test()
</span><span class="lines">@@ -179,16 +192,17 @@
</span><span class="cx">     def test_ews_name(self):
</span><span class="cx">         # These are the names EWS's infrastructure expects, check that they work
</span><span class="cx">         expected_names = {
</span><ins>+            'bindings-ews',
</ins><span class="cx">             'gtk-wk2-ews',
</span><del>-            'win-ews',
</del><span class="cx">             'ios-ews',
</span><span class="cx">             'ios-sim-ews',
</span><ins>+            'jsc-ews',
+            'mac-32bit-ews',
+            'mac-debug-ews',
</ins><span class="cx">             'mac-ews',
</span><span class="cx">             'mac-wk2-ews',
</span><del>-            'mac-debug-ews',
-            'mac-32bit-ews',
-            'bindings-ews',
-            'jsc-ews',
</del><ins>+            'webkitpy-ews',
+            'win-ews',
</ins><span class="cx">             'wpe-ews',
</span><span class="cx">         }
</span><span class="cx">         classes = AbstractEarlyWarningSystem.load_ews_classes()
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepscheckpatchrelevancepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/checkpatchrelevance.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/checkpatchrelevance.py   2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/checkpatchrelevance.py      2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -64,9 +64,15 @@
</span><span class="cx">         "Tools/Scripts/webkitdirs.pm",
</span><span class="cx">     ]
</span><span class="cx"> 
</span><ins>+    webkitpy_paths = [
+        "Tools/Scripts/webkitpy/",
+        "Tools/QueueStatusServer/",
+    ]
+
</ins><span class="cx">     group_to_paths_mapping = {
</span><span class="cx">         'bindings': bindings_paths,
</span><span class="cx">         'jsc': jsc_paths,
</span><ins>+        'webkitpy': webkitpy_paths,
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     def _changes_are_relevant(self, changed_files):
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepsruntestspy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py      2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/runtests.py 2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -70,6 +70,10 @@
</span><span class="cx">             self._run_bindings_tests()
</span><span class="cx">             return
</span><span class="cx"> 
</span><ins>+        if self._options.group == "webkitpy":
+            self._run_webkitpy_tests()
+            return
+
</ins><span class="cx">         if self._options.iterate_on_new_tests:
</span><span class="cx">             _log.info("Running run-webkit-tests on new tests")
</span><span class="cx">             self._run_webkit_tests(self._options.iterate_on_new_tests)
</span><span class="lines">@@ -165,6 +169,14 @@
</span><span class="cx">         args.append("--json-output=%s" % results_file_path)
</span><span class="cx">         self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
</span><span class="cx"> 
</span><ins>+    def _run_webkitpy_tests(self):
+        args = self._tool.deprecated_port().run_python_unittests_command()
+        results_directory = self._tool.port_factory.get(options=self._options).python_unittest_results_directory()
+        self._tool.filesystem.maybe_make_directory(results_directory)
+        results_file_path = self._tool.filesystem.join(results_directory, "webkitpy_test_results.json")
+        args.append("--json-output={}".format(results_file_path))
+        self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
+
</ins><span class="cx">     def _run_api_tests(self):
</span><span class="cx">         args = self._tool.deprecated_port().run_api_tests_command(self._options.build_style)
</span><span class="cx">         results_directory = self._tool.port_factory.get(options=self._options).api_results_directory()
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpytoolstepssteps_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py (224546 => 224547)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py        2017-11-07 21:36:07 UTC (rev 224546)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py   2017-11-07 22:30:57 UTC (rev 224547)
</span><span class="lines">@@ -261,6 +261,19 @@
</span><span class="cx"> """
</span><span class="cx">         OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
</span><span class="cx"> 
</span><ins>+    def test_runtests_webkitpy(self):
+        mock_options = self._step_options()
+        mock_options.non_interactive = False
+        mock_options.group = "webkitpy"
+        step = steps.RunTests(MockTool(log_executive=True), mock_options)
+        tool = MockTool(log_executive=True)
+        # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
+        tool._deprecated_port = DeprecatedPort()
+        step = steps.RunTests(tool, mock_options)
+        expected_logs = """MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy', '--json-output=/tmp/python-unittest-results/webkitpy_test_results.json'], cwd=/mock-checkout
+"""
+        OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
+
</ins><span class="cx">     def test_patch_relevant_bindings(self):
</span><span class="cx">         self.maxDiff = None
</span><span class="cx">         mock_options = self._step_options()
</span></span></pre>
</div>
</div>

</body>
</html>