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

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

Issue 2766823003: Fix testharness result parsing, make "Harness error" count as failure. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Utility module for checking testharness test output.""" 5 """Utility module for checking testharness test output."""
6 6
7 _TESTHARNESSREPORT_HEADER = 'This is a testharness.js-based test.' 7 _TESTHARNESSREPORT_HEADER = 'This is a testharness.js-based test.'
8 _TESTHARNESSREPORT_FOOTER = 'Harness: the test ran to completion.' 8 _TESTHARNESSREPORT_FOOTER = 'Harness: the test ran to completion.'
9 9
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 at_least_one_pass = False 47 at_least_one_pass = False
48 48
49 for line in lines: 49 for line in lines:
50 if line.startswith('PASS'): 50 if line.startswith('PASS'):
51 at_least_one_pass = True 51 at_least_one_pass = True
52 continue 52 continue
53 if (line.startswith('FAIL') or 53 if (line.startswith('FAIL') or
54 line.startswith('TIMEOUT') or 54 line.startswith('TIMEOUT') or
55 line.startswith('NOTRUN') or 55 line.startswith('NOTRUN') or
56 line.startswith('Harness Error. harness_status = ')): 56 line.startswith('Harness Error.')):
qyearsley 2017/03/21 22:18:11 This turned out to be a very minor error. This was
57 return False 57 return False
58 58
59 return at_least_one_pass 59 return at_least_one_pass
60 60
61 61
62 def has_console_errors_or_warnings(content_text): 62 def has_console_errors_or_warnings(content_text):
63 """Returns whether |content_text| is has console errors or warnings.""" 63 """Returns whether |content_text| is has console errors or warnings."""
64 64
65 def is_warning_or_error(line): 65 def is_warning_or_error(line):
66 return line.startswith('CONSOLE ERROR:') or line.startswith('CONSOLE WAR NING:') 66 return line.startswith('CONSOLE ERROR:') or line.startswith('CONSOLE WAR NING:')
67 67
68 lines = content_text.strip().splitlines() 68 lines = content_text.strip().splitlines()
69 return any(is_warning_or_error(line) for line in lines) 69 return any(is_warning_or_error(line) for line in lines)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/testharness_results_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698