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

Side by Side Diff: webkit/tools/layout_tests/test_output_formatter.py

Issue 160054: Adds a new unit tests for layout tests formatting script.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « webkit/tools/layout_tests/layout_package/failure_finder_test.py ('k') | no next file » | 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 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 This is a script for generating easily-viewable comparisons of text and pixel 7 This is a script for generating easily-viewable comparisons of text and pixel
8 diffs. 8 diffs.
9 """ 9 """
10 import optparse 10 import optparse
11 11
12 from layout_package import test_expectations 12 from layout_package import test_expectations
13 from layout_package import failure 13 from layout_package import failure
14 from layout_package import failure_finder 14 from layout_package import failure_finder
15 from layout_package import failure_finder_test
15 from layout_package import html_generator 16 from layout_package import html_generator
16 17
17 DEFAULT_BUILDER = "Webkit" 18 DEFAULT_BUILDER = "Webkit"
18 19
19 def main(options, args): 20 def main(options, args):
20 21
22 if options.run_tests:
23 fft = failure_finder_test.FailureFinderTest()
24 return fft.runTests()
25
21 # TODO(gwilson): Add a check that verifies the given platform exists. 26 # TODO(gwilson): Add a check that verifies the given platform exists.
22 27
23 finder = failure_finder.FailureFinder(options.build_number, 28 finder = failure_finder.FailureFinder(options.build_number,
24 options.platform_builder, 29 options.platform_builder,
25 (not options.include_expected), 30 (not options.include_expected),
26 options.test_regex, 31 options.test_regex,
27 options.output_dir, 32 options.output_dir,
28 int(options.max_failures), 33 int(options.max_failures),
29 options.verbose) 34 options.verbose)
30 failure_list = finder.GetFailures() 35 failure_list = finder.GetFailures()
(...skipping 28 matching lines...) Expand all
59 help = "Use the given build number") 64 help = "Use the given build number")
60 option_parser.add_option("-t", "--test-regex", 65 option_parser.add_option("-t", "--test-regex",
61 default = None, 66 default = None,
62 help = "Use the given regex to filter tests") 67 help = "Use the given regex to filter tests")
63 option_parser.add_option("-o", "--output-dir", 68 option_parser.add_option("-o", "--output-dir",
64 default = ".", 69 default = ".",
65 help = "Output files to given directory") 70 help = "Output files to given directory")
66 option_parser.add_option("-m", "--max-failures", 71 option_parser.add_option("-m", "--max-failures",
67 default = 100, 72 default = 100,
68 help = "Limit the maximum number of failures") 73 help = "Limit the maximum number of failures")
74 option_parser.add_option("-r", "--run-tests", action = "store_true",
75 default = False,
76 help = "Runs unit tests")
69 options, args = option_parser.parse_args() 77 options, args = option_parser.parse_args()
70 main(options, args) 78 main(options, args)
71 79
OLDNEW
« no previous file with comments | « webkit/tools/layout_tests/layout_package/failure_finder_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698