Index: Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py |
index cd0ed51f5ba421991c7e545866e43624db95e29e..abd51fbc670ae89fd033f9f0d1bf1ca1a6354f33 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py |
@@ -67,13 +67,16 @@ ERROR_CODES = ( |
# the value returned by num_regressions |
MAX_FAILURES_EXIT_STATUS = 101 |
+ |
class TestRunException(Exception): |
+ |
def __init__(self, code, msg): |
self.code = code |
self.msg = msg |
class TestRunResults(object): |
+ |
def __init__(self, expectations, num_tests): |
self.total = num_tests |
self.remaining = self.total |
@@ -134,7 +137,9 @@ class TestRunResults(object): |
class RunDetails(object): |
- def __init__(self, exit_code, summarized_full_results=None, summarized_failing_results=None, initial_results=None, retry_results=None, enabled_pixel_tests_in_retry=False): |
+ |
+ def __init__(self, exit_code, summarized_full_results=None, summarized_failing_results=None, |
+ initial_results=None, retry_results=None, enabled_pixel_tests_in_retry=False): |
self.exit_code = exit_code |
self.summarized_full_results = summarized_full_results |
self.summarized_failing_results = summarized_failing_results |
@@ -163,7 +168,8 @@ def _interpret_test_failures(failures): |
return test_dict |
-def summarize_results(port_obj, expectations, initial_results, retry_results, enabled_pixel_tests_in_retry, only_include_failing=False): |
+def summarize_results(port_obj, expectations, initial_results, retry_results, |
+ enabled_pixel_tests_in_retry, only_include_failing=False): |
"""Returns a dictionary containing a summary of the test runs, with the following fields: |
'version': a version indicator |
'fixable': The number of fixable tests (NOW - PASS) |
@@ -216,7 +222,7 @@ def summarize_results(port_obj, expectations, initial_results, retry_results, en |
if retry_results: |
if test_name not in retry_results.unexpected_results_by_name: |
# The test failed unexpectedly at first, but ran as expected the second time -> flaky. |
- actual.extend(expectations.get_expectations_string(test_name).split(" ")) |
+ actual.extend(expectations.get_expectations_string(test_name).split(' ')) |
num_flaky += 1 |
else: |
retry_result_type = retry_results.unexpected_results_by_name[test_name].type |
@@ -251,12 +257,12 @@ def summarize_results(port_obj, expectations, initial_results, retry_results, en |
test_dict.update(reftest_type=list(result.reftest_type)) |
test_dict['expected'] = expected |
- test_dict['actual'] = " ".join(actual) |
+ test_dict['actual'] = ' '.join(actual) |
def is_expected(actual_result): |
return expectations.matches_an_expected_result(test_name, result_type, |
- port_obj.get_option('pixel_tests') or result.reftest_type, |
- port_obj.get_option('enable_sanitizer')) |
+ port_obj.get_option('pixel_tests') or result.reftest_type, |
+ port_obj.get_option('enable_sanitizer')) |
# To avoid bloating the output results json too much, only add an entry for whether the failure is unexpected. |
if not all(is_expected(actual_result) for actual_result in actual): |
@@ -299,7 +305,9 @@ def summarize_results(port_obj, expectations, initial_results, retry_results, en |
results['num_flaky'] = num_flaky |
# FIXME: Remove this. It is redundant with results['num_failures_by_type']. |
results['num_regressions'] = num_regressions |
- results['interrupted'] = initial_results.interrupted # Does results.html have enough information to compute this itself? (by checking total number of results vs. total number of tests?) |
+ # Does results.html have enough information to compute this itself? (by |
+ # checking total number of results vs. total number of tests?) |
+ results['interrupted'] = initial_results.interrupted |
results['layout_tests_dir'] = port_obj.layout_tests_dir() |
results['has_wdiff'] = port_obj.wdiff_available() |
results['has_pretty_patch'] = port_obj.pretty_patch_available() |