Modified: trunk/Tools/ChangeLog (235804 => 235805)
--- trunk/Tools/ChangeLog 2018-09-07 20:44:39 UTC (rev 235804)
+++ trunk/Tools/ChangeLog 2018-09-07 20:58:15 UTC (rev 235805)
@@ -1,3 +1,19 @@
+2018-09-07 Simon Fraser <[email protected]>
+
+ resultsjsonparser needs to handle leak failures
+ https://bugs.webkit.org/show_bug.cgi?id=189430
+
+ Reviewed by Alexey Proskuryakov.
+
+ Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak
+ with a list of the leaked URLs.
+
+ * Scripts/webkitpy/common/net/resultsjsonparser.py:
+ (JSONTestResult._failure_types_from_actual_result):
+ * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
+ (ParsedJSONResultsTest):
+ (test_basic):
+
2018-09-07 Aakash Jain <[email protected]>
[ews-build] API tests should output result summary in json
Modified: trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser.py (235804 => 235805)
--- trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser.py 2018-09-07 20:44:39 UTC (rev 235804)
+++ trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser.py 2018-09-07 20:58:15 UTC (rev 235805)
@@ -121,6 +121,11 @@
elif actual == test_expectations.CRASH:
# NOTE: We don't know what process crashed from the json, just that a process crashed.
return [test_failures.FailureCrash()]
+ elif actual == test_expectations.LEAK:
+ urls = []
+ for url_dict in self._result_dict['leaks']:
+ urls.append(url_dict['document'])
+ return [test_failures.FailureDocumentLeak(urls)]
elif actual == test_expectations.MISSING:
return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
else:
Modified: trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py (235804 => 235805)
--- trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py 2018-09-07 20:44:39 UTC (rev 235804)
+++ trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py 2018-09-07 20:58:15 UTC (rev 235805)
@@ -58,13 +58,12 @@
},
"prototype-strawberry.html": {
"expected": "PASS",
- "actual": "FAIL PASS",
- "leaks": {
- "documents": [
- "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html",
- "about:blank"
- ]
- }
+ "actual": "LEAK",
+ "leaks": [
+ {
+ "document": "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html"
+ }
+ ]
}
}
},
@@ -112,13 +111,12 @@
},
"prototype-strawberry.html": {
"expected": "PASS",
- "actual": "FAIL PASS",
- "leaks": {
- "documents": [
- "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html",
- "about:blank"
- ]
- }
+ "actual": "LEAK",
+ "leaks": [
+ {
+ "document": "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html"
+ }
+ ]
}
}
},
@@ -148,6 +146,7 @@
expected_results = [
test_results.TestResult("svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html", [test_failures.FailureImageHashMismatch()], 0),
test_results.TestResult("fast/dom/prototype-inheritance.html", [test_failures.FailureTextMismatch(), test_failures.FailureImageHashMismatch(), test_failures.FailureAudioMismatch()], 0),
+ test_results.TestResult("fast/dom/prototype-strawberry.html", [test_failures.FailureDocumentLeak(['file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html'])], 0),
]
parsed_results = ParsedJSONResults(self._example_full_results_json)
self.assertEqual(expected_results, parsed_results.test_results())