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 c68f1f0733b91a9b87f53ab47bfa2dd4d215bc8a..894a719e77cb8253f10375a0248ed59e80ef726a 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py |
@@ -37,6 +37,7 @@ from webkitpy.layout_tests.port.driver import DeviceFailure, DriverInput, Driver |
from webkitpy.layout_tests.models import test_expectations |
from webkitpy.layout_tests.models import test_failures |
from webkitpy.layout_tests.models.test_results import TestResult |
+from webkitpy.layout_tests.testharness import testharness_results_checker |
_log = logging.getLogger(__name__) |
@@ -272,29 +273,11 @@ class SingleTestRunner(object): |
if driver_output.image or driver_output.audio or self._is_render_tree(driver_output.text): |
return False, [] |
- failures = [] |
- 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: |
- return False, [] |
- if not footer in lines: |
- 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 not testharness_results_checker.is_testharness_output(text): |
+ return False, [] |
+ if not testharness_results_checker.is_testharness_output_passing(text): |
return True, [test_failures.FailureTestHarnessAssertion()] |
return True, [] |