Changeset 235805 in webkit


Ignore:
Timestamp:
Sep 7, 2018 1:58:15 PM (6 years ago)
Author:
Simon Fraser
Message:

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):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r235789 r235805  
     12018-09-07  Simon Fraser  <simon.fraser@apple.com>
     2
     3        resultsjsonparser needs to handle leak failures
     4        https://bugs.webkit.org/show_bug.cgi?id=189430
     5
     6        Reviewed by Alexey Proskuryakov.
     7       
     8        Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak
     9        with a list of the leaked URLs.
     10
     11        * Scripts/webkitpy/common/net/resultsjsonparser.py:
     12        (JSONTestResult._failure_types_from_actual_result):
     13        * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
     14        (ParsedJSONResultsTest):
     15        (test_basic):
     16
    1172018-09-07  Aakash Jain  <aakash_jain@apple.com>
    218
  • trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser.py

    r174130 r235805  
    122122            # NOTE: We don't know what process crashed from the json, just that a process crashed.
    123123            return [test_failures.FailureCrash()]
     124        elif actual == test_expectations.LEAK:
     125            urls = []
     126            for url_dict in self._result_dict['leaks']:
     127                urls.append(url_dict['document'])
     128            return [test_failures.FailureDocumentLeak(urls)]
    124129        elif actual == test_expectations.MISSING:
    125130            return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
  • trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py

    r235467 r235805  
    5959                "prototype-strawberry.html": {
    6060                    "expected": "PASS",
    61                     "actual": "FAIL PASS",
    62                     "leaks": {
    63                         "documents": [
    64                             "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html",
    65                             "about:blank"
    66                         ]
    67                     }
     61                    "actual": "LEAK",
     62                    "leaks": [
     63                        {
     64                            "document": "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html"
     65                        }
     66                    ]
    6867                }
    6968            }
     
    113112                "prototype-strawberry.html": {
    114113                    "expected": "PASS",
    115                     "actual": "FAIL PASS",
    116                     "leaks": {
    117                         "documents": [
    118                             "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html",
    119                             "about:blank"
    120                         ]
    121                     }
     114                    "actual": "LEAK",
     115                    "leaks": [
     116                        {
     117                            "document": "file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html"
     118                        }
     119                    ]
    122120                }
    123121            }
     
    149147            test_results.TestResult("svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html", [test_failures.FailureImageHashMismatch()], 0),
    150148            test_results.TestResult("fast/dom/prototype-inheritance.html", [test_failures.FailureTextMismatch(), test_failures.FailureImageHashMismatch(), test_failures.FailureAudioMismatch()], 0),
     149            test_results.TestResult("fast/dom/prototype-strawberry.html", [test_failures.FailureDocumentLeak(['file:///Volumes/Data/slave/webkit/build/LayoutTests/fast/dom/prototype-strawberry.html'])], 0),
    151150        ]
    152151        parsed_results = ParsedJSONResults(self._example_full_results_json)
Note: See TracChangeset for help on using the changeset viewer.