Title: [91261] trunk/Tools
Revision
91261
Author
[email protected]
Date
2011-07-19 09:13:33 -0700 (Tue, 19 Jul 2011)

Log Message

webkit-patch rebaseline crashes on use
https://bugs.webkit.org/show_bug.cgi?id=64775

Reviewed by Adam Roben.

Fix incorrectly spelled attribute name.

* Scripts/webkitpy/common/net/layouttestresults.py:
The attribute is test_name, not filename.

* Scripts/webkitpy/common/net/layouttestresults_unittest.py:
Add test for tests_matching_failure_types.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (91260 => 91261)


--- trunk/Tools/ChangeLog	2011-07-19 15:56:57 UTC (rev 91260)
+++ trunk/Tools/ChangeLog	2011-07-19 16:13:33 UTC (rev 91261)
@@ -1,3 +1,18 @@
+2011-07-19  Sam Weinig  <[email protected]>
+
+        webkit-patch rebaseline crashes on use
+        https://bugs.webkit.org/show_bug.cgi?id=64775
+
+        Reviewed by Adam Roben.
+
+        Fix incorrectly spelled attribute name.
+
+        * Scripts/webkitpy/common/net/layouttestresults.py:
+        The attribute is test_name, not filename.
+
+        * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+        Add test for tests_matching_failure_types.
+
 2011-07-18  Eric Seidel  <[email protected]>
 
         new-run-webkit-tests should support --leaks

Modified: trunk/Tools/Scripts/webkitpy/common/net/layouttestresults.py (91260 => 91261)


--- trunk/Tools/Scripts/webkitpy/common/net/layouttestresults.py	2011-07-19 15:56:57 UTC (rev 91260)
+++ trunk/Tools/Scripts/webkitpy/common/net/layouttestresults.py	2011-07-19 16:13:33 UTC (rev 91261)
@@ -164,7 +164,7 @@
         return [result for result in self._test_results if result.has_failure_matching_types(*failure_types)]
 
     def tests_matching_failure_types(self, failure_types):
-        return [result.filename for result in self.results_matching_failure_types(failure_types)]
+        return [result.test_name for result in self.results_matching_failure_types(failure_types)]
 
     def failing_test_results(self):
         # These should match the "fail", "crash", and "timeout" keys.

Modified: trunk/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py (91260 => 91261)


--- trunk/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py	2011-07-19 15:56:57 UTC (rev 91260)
+++ trunk/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py	2011-07-19 16:13:33 UTC (rev 91261)
@@ -61,6 +61,49 @@
 </html>
 """
 
+    _example_results_html_with_failing_tests = """
+<html>
+<head>
+<title>Layout Test Results</title>
+</head>
+<body>
+<p>Tests where results did not match expected results:</p>
+<table>
+<tr>
+<td><a href=""
+<td>
+<a href=""
+</td>
+<td>
+<a href=""
+</td>
+<td>
+<a href=""
+</td>
+<td>
+<a href="" diff</a>
+</td>
+</tr>
+</table>
+<p>Tests that had stderr output:</p>
+<table>
+<tr>
+<td><a href=""
+<td><a href=""
+</tr>
+<td><a href=""
+<td><a href=""
+</tr>
+</table><p>Tests that had no expected results (probably new):</p>
+<table>
+<tr>
+<td><a href=""
+<td><a href=""
+</tr>
+</table></body>
+</html>
+"""
+
     def test_parse_layout_test_results(self):
         failures = [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
         testname = 'fast/repaint/no-caret-repaint-in-non-content-editable-element.html'
@@ -96,3 +139,8 @@
         self.assertEqual(LayoutTestResults.results_from_string(""), None)
         results = LayoutTestResults.results_from_string(ORWTResultsHTMLParserTest._example_results_html)
         self.assertEqual(len(results.failing_tests()), 0)
+
+    def test_tests_matching_failure_types(self):
+        results = LayoutTestResults.results_from_string(ORWTResultsHTMLParserTest._example_results_html_with_failing_tests)
+        failing_tests = results.tests_matching_failure_types([test_failures.FailureTextMismatch])
+        self.assertEqual(len(results.failing_tests()), 1)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to