Changeset 90538 in webkit
- Timestamp:
- Jul 6, 2011 9:42:54 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r90537 r90538 1 2011-07-06 Adam Barth <abarth@webkit.org> 2 3 Cleanup result_summary.py 4 https://bugs.webkit.org/show_bug.cgi?id=64057 5 6 Reviewed by Eric Seidel. 7 8 This class had a bunch of out-of-date docstrings that no longer make 9 any sense. 10 11 * Scripts/webkitpy/layout_tests/models/result_summary.py: 12 1 13 2011-07-06 Adam Barth <abarth@webkit.org> 2 14 -
trunk/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py
r90534 r90538 1 #!/usr/bin/env python2 1 # Copyright (C) 2010 Google Inc. All rights reserved. 3 2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged … … 29 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 29 31 """Run layout tests.""" 32 33 import logging 34 35 from webkitpy.layout_tests.models import test_expectations 36 from webkitpy.layout_tests.models.test_expectations import TestExpectations 37 38 39 _log = logging.getLogger(__name__) 30 from webkitpy.layout_tests.models.test_expectations import TestExpectations, SKIP, CRASH, TIMEOUT 40 31 41 32 42 33 class ResultSummary(object): 43 """A class for partitioning the test results we get into buckets.44 45 This class is basically a glorified struct and it's private to this file46 so we don't bother with any information hiding."""47 48 34 def __init__(self, expectations, test_files): 49 35 self.total = len(test_files) … … 60 46 self.unexpected_results = {} 61 47 self.failures = {} 62 self.tests_by_expectation[ test_expectations.SKIP] = set()48 self.tests_by_expectation[SKIP] = set() 63 49 for expectation in TestExpectations.EXPECTATIONS.values(): 64 50 self.tests_by_expectation[expectation] = set() … … 66 52 self.tests_by_timeline[timeline] = expectations.get_tests_with_timeline(timeline) 67 53 68 def add(self, result, expected): 69 """Add a TestResult into the appropriate bin. 70 71 Args: 72 result: TestResult 73 expected: whether the result was what we expected it to be. 74 """ 75 76 self.tests_by_expectation[result.type].add(result.test_name) 77 self.results[result.test_name] = result 54 def add(self, test_result, expected): 55 self.tests_by_expectation[test_result.type].add(test_result.test_name) 56 self.results[test_result.test_name] = test_result 78 57 self.remaining -= 1 79 if len( result.failures):80 self.failures[ result.test_name] =result.failures58 if len(test_result.failures): 59 self.failures[test_result.test_name] = test_result.failures 81 60 if expected: 82 61 self.expected += 1 83 62 else: 84 self.unexpected_results[ result.test_name] =result63 self.unexpected_results[test_result.test_name] = test_result 85 64 self.unexpected += 1 86 if len( result.failures):65 if len(test_result.failures): 87 66 self.unexpected_failures += 1 88 if result.type == test_expectations.CRASH:67 if test_result.type == CRASH: 89 68 self.unexpected_crashes += 1 90 elif result.type == test_expectations.TIMEOUT:69 elif test_result.type == TIMEOUT: 91 70 self.unexpected_timeouts += 1
Note: See TracChangeset
for help on using the changeset viewer.