Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1262)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py

Issue 2668973002: Consider any testharness result with >= 1 PASS and no FAIL to be passing. (Closed)
Patch Set: Remove two lines from TestExpectations Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py
index 10994fb19b30a448300366b60ceed6426fb9f9d9..8407b1d877a7ec8c49c4a3bd747139980af6e537 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py
@@ -34,47 +34,29 @@ def is_testharness_output(content_text):
def is_testharness_output_passing(content_text):
- """Returns whether |content_text| is a passing testharness output."""
+ """Checks whether |content_text| is a passing testharness output.
- # Leading and trailing white spaces are accepted.
+ Under a relatively loose/accepting definition of passing
+ testharness output, we consider any output with at least one
+ PASS result and no FAIL result (or TIMEOUT or NOTRUN).
+ """
+ # Leading and trailing whitespace are ignored.
lines = content_text.strip().splitlines()
lines = [line.strip() for line in lines]
- # The check is very conservative and rejects any unexpected content in the output.
- previous_line_is_console_line = False
- for line in lines:
- # There should be no empty lines, unless the empty line follows a console message.
- if len(line) == 0:
- if previous_line_is_console_line:
- continue
- else:
- return False
-
- # Those lines are expected to be exactly equivalent.
- if line == _TESTHARNESSREPORT_HEADER or line == _TESTHARNESSREPORT_FOOTER:
- previous_line_is_console_line = False
- continue
-
- # Those are expected passing output.
- if line.startswith('CONSOLE'):
- previous_line_is_console_line = True
- continue
+ at_least_one_pass = False
+ for line in lines:
if line.startswith('PASS'):
- previous_line_is_console_line = False
+ at_least_one_pass = True
continue
-
- # Those are expected failing output.
if (line.startswith('FAIL') or
line.startswith('TIMEOUT') or
line.startswith('NOTRUN') or
line.startswith('Harness Error. harness_status = ')):
return False
- # Unexpected output should be considered as a failure.
- return False
-
- return True
+ return at_least_one_pass
def has_console_errors_or_warnings(content_text):

Powered by Google App Engine
This is Rietveld 408576698