[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
hayato at chromium.org
hayato at chromium.org
Wed Dec 22 17:56:50 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 4ff803737754f92b38441545f3ec22374bf6a689
Author: hayato at chromium.org <hayato at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 3 02:29:13 2010 +0000
2010-12-02 Hayato Ito <hayato at chromium.org>
Reviewed by Eric Seidel.
Refactor test_types's compare_output() method so that it takes a
TestInput object.
compare_output() will need additional information included in a TestInput
object to support reftests. This change is a pre-requirement of that.
https://bugs.webkit.org/show_bug.cgi?id=50362
* Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
* Scripts/webkitpy/layout_tests/test_types/image_diff.py:
* Scripts/webkitpy/layout_tests/test_types/test_type_base.py:
* Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py:
* Scripts/webkitpy/layout_tests/test_types/text_diff.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 42fc713..d675077 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-02 Hayato Ito <hayato at chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Refactor test_types's compare_output() method so that it takes a
+ TestInput object.
+
+ compare_output() will need additional information included in a TestInput
+ object to support reftests. This change is a pre-requirement of that.
+
+ https://bugs.webkit.org/show_bug.cgi?id=50362
+
+ * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
+ * Scripts/webkitpy/layout_tests/test_types/image_diff.py:
+ * Scripts/webkitpy/layout_tests/test_types/test_type_base.py:
+ * Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py:
+ * Scripts/webkitpy/layout_tests/test_types/text_diff.py:
+
2010-12-02 Simon Fraser <simon.fraser at apple.com>
Reviewed by Anders Carlsson.
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
index 880cc60..8c5bc11 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py
@@ -386,19 +386,20 @@ class TestShellThread(WatchableThread):
test_input.image_hash = self._port.expected_checksum(
test_input.filename)
test_output = driver.run_test(test_input)
- return self._process_output(test_input.filename, test_output)
+ return self._process_output(test_input, test_output)
- def _process_output(self, test_filename, test_output):
+ def _process_output(self, test_input, test_output):
"""Receives the output from a DumpRenderTree process, subjects it to a
number of tests, and returns a list of failure types the test produced.
Args:
- test_filename: full path to the test in question.
+ test_input: a TestInput object
test_output: a TestOutput object containing the output of the test
Returns: a TestResult object
"""
failures = []
+ test_filename = test_input.filename
if test_output.crash:
failures.append(test_failures.FailureCrash())
@@ -426,7 +427,7 @@ class TestShellThread(WatchableThread):
for test_type in self._test_types:
start_diff_time = time.time()
new_failures = test_type.compare_output(self._port,
- test_filename,
+ test_input,
self._test_args,
test_output,
expected_test_output)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
index da466c8..f1855f5 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/image_diff.py
@@ -90,12 +90,13 @@ class ImageDiff(test_type_base.TestTypeBase):
self.FILENAME_SUFFIX_COMPARE)
return port.diff_image(actual_image, expected_image, diff_filename)
- def compare_output(self, port, filename, test_args, actual_test_output,
+ def compare_output(self, port, test_input, test_args, actual_test_output,
expected_test_output):
"""Implementation of CompareOutput that checks the output image and
checksum against the expected files from the LayoutTest directory.
"""
failures = []
+ filename = test_input.filename
# If we didn't produce a hash file, this test must be text-only.
if actual_test_output.image_hash is None:
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
index 4b96b3a..ada6e61 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base.py
@@ -140,7 +140,7 @@ class TestTypeBase(object):
self._port.relative_test_filename(filename))
return os.path.splitext(output_filename)[0] + modifier
- def compare_output(self, port, filename, test_args, actual_test_output,
+ def compare_output(self, port, test_input, test_args, actual_test_output,
expected_test_output):
"""Method that compares the output from the test with the
expected value.
@@ -149,7 +149,7 @@ class TestTypeBase(object):
Args:
port: object implementing port-specific information and methods
- filename: absolute filename to test file
+ test_input: a TestInput object
test_args: a TestArguments object holding optional additional
arguments
actual_test_output: a TestOutput object which represents actual test
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py
index 5dbfcb6..2e94f0e 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/test_type_base_unittest.py
@@ -39,8 +39,7 @@ class Test(unittest.TestCase):
def test_compare_output_notimplemented(self):
test_type = test_type_base.TestTypeBase(None, None)
self.assertRaises(NotImplementedError, test_type.compare_output,
- None, "foo.txt", '',
- test_type_base.TestArguments(), 'Debug')
+ None, None, test_type_base.TestArguments(), None, None)
if __name__ == '__main__':
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
index ca4b17d..f463c74 100644
--- a/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
+++ b/WebKitTools/Scripts/webkitpy/layout_tests/test_types/text_diff.py
@@ -55,7 +55,7 @@ class TestTextDiff(test_type_base.TestTypeBase):
"\r\n", "\n")
return norm + "\n"
- def compare_output(self, port, filename, test_args, actual_test_output,
+ def compare_output(self, port, test_input, test_args, actual_test_output,
expected_test_output):
"""Implementation of CompareOutput that checks the output text against
the expected text from the LayoutTest directory."""
@@ -66,7 +66,7 @@ class TestTextDiff(test_type_base.TestTypeBase):
# Although all test_shell/DumpRenderTree output should be utf-8,
# we do not ever decode it inside run-webkit-tests. For some tests
# DumpRenderTree may not output utf-8 text (e.g. webarchives).
- self._save_baseline_data(filename, actual_test_output.text,
+ self._save_baseline_data(test_input.filename, actual_test_output.text,
".txt", encoding=None,
generate_new_baseline=test_args.new_baseline)
return failures
@@ -79,7 +79,7 @@ class TestTextDiff(test_type_base.TestTypeBase):
# Write output files for new tests, too.
if port.compare_text(actual_text, expected_text):
# Text doesn't match, write output files.
- self.write_output_files(filename, ".txt", actual_text,
+ self.write_output_files(test_input.filename, ".txt", actual_text,
expected_text, encoding=None,
print_text_diffs=True)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list