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

Unified Diff: Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py

Issue 308223002: Accept spaces before/after testharness.js output and CONSOLE output. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@navigator_crash_test
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
index 9fa219093a8d358e492c0cf948490a38e937c73c..3f4d70d772698a2d60dd24a83081db288ae09644 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
@@ -262,6 +262,7 @@ class SingleTestRunner(object):
found_a_pass = False
text = driver_output.text or ''
lines = text.strip().splitlines()
+ lines = [line.strip() for line in lines]
header = 'This is a testharness.js-based test.'
footer = 'Harness: the test ran to completion.'
if not lines or not header in lines:
@@ -270,12 +271,17 @@ class SingleTestRunner(object):
return True, [test_failures.FailureTestHarnessAssertion()]
for line in lines:
+ if line == header or line == footer or line.startswith('PASS'):
+ continue
+ # CONSOLE output can happen during tests and shouldn't break them.
+ if line.startswith('CONSOLE'):
+ continue
+
if line.startswith('FAIL') or line.startswith('TIMEOUT'):
return True, [test_failures.FailureTestHarnessAssertion()]
# Fail the test if there is any unrecognized output.
- if line != header and line != footer and not line.startswith('PASS'):
- return True, [test_failures.FailureTestHarnessAssertion()]
+ return True, [test_failures.FailureTestHarnessAssertion()]
return True, []
def _is_render_tree(self, text):
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/port/test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698