summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 23:38:35 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-09 23:38:35 +0000
commitff34e3e9184dc76abfeec7fc7783336950cfdb8b (patch)
tree16561f3c648a407a21c84a85f9da9fdfe2d2d83d /webkit/tools
parent76658fb7b8c2739e851ae294c60116d2bdfcaf89 (diff)
downloadchromium_src-ff34e3e9184dc76abfeec7fc7783336950cfdb8b.zip
chromium_src-ff34e3e9184dc76abfeec7fc7783336950cfdb8b.tar.gz
chromium_src-ff34e3e9184dc76abfeec7fc7783336950cfdb8b.tar.bz2
Spit out test results in a format amenable to copy-pasting into
the test expecation lsits. BUG=5181 Review URL: http://codereview.chromium.org/13227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/layout_tests/layout_package/compare_failures.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/webkit/tools/layout_tests/layout_package/compare_failures.py b/webkit/tools/layout_tests/layout_package/compare_failures.py
index cd2a3a3..16f3601 100644
--- a/webkit/tools/layout_tests/layout_package/compare_failures.py
+++ b/webkit/tools/layout_tests/layout_package/compare_failures.py
@@ -14,13 +14,14 @@ import test_failures
import test_expectations
-def PrintFilesFromSet(filenames, header_text, output):
+def PrintFilesFromSet(filenames, header_text, output, opt_expectations=None):
"""A helper method to print a list of files to output.
Args:
filenames: a list of absolute filenames
header_text: a string to display before the list of filenames
output: file descriptor to write the results to.
+ opt_expectations: expecations that failed for this test
"""
if not len(filenames):
return
@@ -29,8 +30,13 @@ def PrintFilesFromSet(filenames, header_text, output):
filenames.sort()
output.write("\n")
output.write("%s (%d):\n" % (header_text, len(filenames)))
+ output_string = "%s"
+ if opt_expectations:
+ output_string += " = %s" % opt_expectations
+ output_string += "\n"
for filename in filenames:
- output.write(" %s\n" % path_utils.RelativeTestFilename(filename))
+ output.write(output_string % path_utils.RelativeTestFilename(filename))
+
class CompareFailures:
@@ -84,13 +90,16 @@ class CompareFailures:
# Print real regressions.
PrintFilesFromSet(self._regressed_failures,
"Regressions: Unexpected failures",
- output)
+ output,
+ 'FAIL')
PrintFilesFromSet(self._regressed_hangs,
"Regressions: Unexpected timeouts",
- output)
+ output,
+ 'TIMEOUT')
PrintFilesFromSet(self._regressed_crashes,
"Regressions: Unexpected crashes",
- output)
+ output,
+ 'CRASH')
PrintFilesFromSet(self._missing,
"Missing expected results",
output)