Changeset 85459 in webkit
- Timestamp:
- May 1, 2011 11:14:56 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r85452 r85459 1 2011-05-01 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 JSONTestResult needs to handle multiple results 6 https://bugs.webkit.org/show_bug.cgi?id=59269 7 8 This case occurs when a test is flaky because NRWT will run the test 9 twice and report both results as "actual." 10 11 * Scripts/webkitpy/common/net/resultsjsonparser.py: 12 * Scripts/webkitpy/common/net/resultsjsonparser_unittest.py: 13 1 14 2011-05-01 Adam Barth <abarth@webkit.org> 2 15 -
trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser.py
r85254 r85459 64 64 65 65 def did_pass(self): 66 return self._actual_as_expectation() == test_expectations.PASS66 return test_expectations.PASS in self._actual_as_expectations() 67 67 68 def _actual_as_expectation(self): 69 actual_result = self._result_dict['actual'] 70 # There should always be only one expectation for actual 71 assert(' ' not in actual_result) 72 return test_expectations.TestExpectations.expectation_from_string(actual_result) 68 def _actual_as_expectations(self): 69 actual_results = self._result_dict['actual'] 70 expectations = map(test_expectations.TestExpectations.expectation_from_string, actual_results.split(' ')) 71 if None in expectations: 72 log("Unrecognized actual result in %s" % actual_results) 73 return expectations 73 74 74 def _failures(self): 75 actual = self._actual_as_expectation() 75 def _failure_types_from_actual_result(self, actual): 76 76 # FIXME: There doesn't seem to be a full list of all possible values of 77 77 # 'actual' anywhere. However JSONLayoutResultsGenerator.FAILURE_TO_CHAR … … 96 96 log("Failed to handle: %s" % self._result_dict['actual']) 97 97 return [] 98 99 def _failures(self): 100 if self.did_pass(): 101 return [] 102 return sum(map(self._failure_types_from_actual_result, self._actual_as_expectations()), []) 98 103 99 104 def test_result(self): -
trunk/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
r85254 r85459 43 43 "expected": "PASS", 44 44 "actual": "TEXT" 45 }, 46 "prototype-banana.html": { 47 "expected": "TEXT", 48 "actual": "PASS" 49 }, 50 "prototype-taco.html": { 51 "expected": "PASS", 52 "actual": "PASS TEXT" 53 }, 54 "prototype-strawberry.html": { 55 "expected": "PASS", 56 "actual": "TEXT PASS" 45 57 } 46 58 }
Note: See TracChangeset
for help on using the changeset viewer.