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

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

Issue 332583002: Add PRESUBMIT checks for not required testharness expected files. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix imports Created 6 years, 3 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: 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 8a5475856fdcaf06942e31751ed13d951a83ddbe..382bfccdb25e0af3258f33666096047fda71981b 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.models import testharness_results
_log = logging.getLogger(__name__)
@@ -273,29 +274,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.is_testharness_output(text):
+ return False, []
+ if not testharness_results.is_testharness_output_passing(text):
return True, [test_failures.FailureTestHarnessAssertion()]
return True, []
« no previous file with comments | « Tools/Scripts/check-testharness-expected-pass ('k') | Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698