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

Side by Side Diff: Tools/Scripts/check-testharness-expected-pass

Issue 986393003: Allow expected.txt files in testharness LayoutTests with console errors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test failures Created 5 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 | Tools/Scripts/webkitpy/layout_tests/models/testharness_results.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2014 The Chromium Authors. All rights reserved. 3 # Copyright 2014 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Check if a LayoutTest expected file is a passing testharness result. 7 """Check if a LayoutTest expected file is a passing testharness result.
8 8
9 The intent of this script is to identify expected files that are passing 9 The intent of this script is to identify expected files that are passing
10 testharness.js results. Those files are not needed because the test 10 testharness.js results. Those files are not needed because the test
11 infrastructure will read the output of testharness.js tests if there is no 11 infrastructure will read the output of testharness.js tests if there is no
12 expected files.""" 12 expected files."""
13 13
14 14
15 import fileinput 15 import fileinput
16 import sys 16 import sys
17 17
18 from webkitpy.layout_tests.models import testharness_results 18 from webkitpy.layout_tests.models import testharness_results
19 19
20 paths = [] 20 paths = []
21 21
22 for path in sys.argv[1:]: 22 for path in sys.argv[1:]:
23 content = open(path, 'r').read() 23 content = open(path, 'r').read()
24 if testharness_results.is_testharness_output(content) and \ 24 if testharness_results.is_testharness_output(content) and \
25 testharness_results.is_testharness_output_passing(content): 25 testharness_results.is_testharness_output_passing(content) and \
26 not testharness_results.is_testharness_output_with_console_errors(content ):
Dirk Pranke 2015/04/30 16:00:37 nit: the expressions should be line wrapped by wra
jww 2015/04/30 16:18:37 Done (on the actual CL)
26 paths.append(path) 27 paths.append(path)
27 28
28 if len(paths) > 0: 29 if len(paths) > 0:
29 sys.stderr.write('* The following files are passing testharness results, the y should be removed:\n ') 30 sys.stderr.write('* The following files are passing testharness results with out console error messages, they should be removed:\n ')
30 sys.stderr.write('\n '.join(paths)) 31 sys.stderr.write('\n '.join(paths))
31 sys.stderr.write('\n') 32 sys.stderr.write('\n')
32 sys.exit("ERROR: found passing testharness results.") 33 sys.exit("ERROR: found passing testharness results without console error mes sages.")
OLDNEW
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/models/testharness_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698