WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP.
bug-71567-20111105024423.patch (text/plain), 5.65 KB, created by
Hayato Ito
on 2011-11-04 10:44:25 PDT
(
hide
)
Description:
WIP.
Filename:
MIME Type:
Creator:
Hayato Ito
Created:
2011-11-04 10:44:25 PDT
Size:
5.65 KB
patch
obsolete
>Subversion Revision: 99180 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a9ed5ebc8b5dbd5a43b980446d948c71ba08edaf..afbeaa2952bdff14ce060fbd026b6d9825c3a7d5 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,18 @@ >+2011-11-04 Hayato Ito <hayato@chromium.org> >+ >+ [NRWT] Make single_test_runner aware of reference filename of test_input. >+ https://bugs.webkit.org/show_bug.cgi?id=71567 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Make single_test_runner honor a reference filename of given test_input so that >+ we can use any file as reference html, instead of naming convention. >+ The typical use case is to support w3c reftests. >+ >+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py: >+ * Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py: >+ * Scripts/webkitpy/layout_tests/models/test_failures.py: >+ > 2011-11-03 Philippe Normand <pnormand@igalia.com> > > [GTK] [WK2] ttf-liberation fonts moved to a new location (in Debian) >diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py >index 1767373bc84ee27fb3e084534c04c6ef7e55220e..2c6eedd6bf2eea8c251fa71a42ca0c39ec618ddd 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py >+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py >@@ -61,6 +61,12 @@ class SingleTestRunner: > self._reference_filename = None > > fs = port._filesystem >+ if test_input.ref_file: >+ self._is_reftest = True >+ self._reference_filename = fs.join(self._port.layout_tests_dir(), test_input.ref_file) >+ self._is_mismatch_reftest = test_input.is_mismatch >+ return >+ > reftest_expected_filename = port.reftest_expected_filename(self._test_name) > if fs.exists(reftest_expected_filename): > self._is_reftest = True >@@ -304,7 +310,7 @@ class SingleTestRunner: > > if self._is_mismatch_reftest: > if driver_output1.image_hash == driver_output2.image_hash: >- failures.append(test_failures.FailureReftestMismatchDidNotOccur()) >+ failures.append(test_failures.FailureReftestMismatchDidNotOccur(self._reference_filename)) > elif driver_output1.image_hash != driver_output2.image_hash: >- failures.append(test_failures.FailureReftestMismatch()) >+ failures.append(test_failures.FailureReftestMismatch(self._reference_filename)) > return TestResult(self._test_name, failures, total_test_time, has_stderr) >diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py >index 03e95d87adde7d907c45da06b51c72ad2794ecf5..0a2eb78b5497d986e54d66c64f12dde4b18bd9f7 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py >+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/test_result_writer.py >@@ -73,10 +73,10 @@ def write_test_result(port, test_name, driver_output, > image_diff = port.diff_image(driver_output.image, expected_driver_output.image)[0] > if image_diff: > writer.write_image_diff_files(image_diff) >- writer.copy_file(port.reftest_expected_filename(test_name), '-expected.html') >+ writer.copy_file(failure.reference_filename) > elif isinstance(failure, test_failures.FailureReftestMismatchDidNotOccur): > writer.write_image_files(driver_output.image, expected_image=None) >- writer.copy_file(port.reftest_expected_mismatch_filename(test_name), '-expected-mismatch.html') >+ writer.copy_file(failure.reference_filename) > else: > assert isinstance(failure, (test_failures.FailureTimeout,)) > >@@ -264,9 +264,10 @@ Difference between images: <a href="%(diff_filename)s">diff</a><br> > # FIXME: This seems like a text file, not a binary file. > self._port._filesystem.write_binary_file(diffs_html_filename, html) > >- def copy_file(self, src_filepath, dst_extension): >+ def copy_file(self, src_filepath): > fs = self._port._filesystem > assert fs.exists(src_filepath), 'src_filepath: %s' % src_filepath >- dst_filename = self.output_filename(dst_extension) >+ dst_filepath = fs.join(self._root_output_dir, >+ self._port.relative_test_filename(src_filepath)) > self._make_output_directory() >- fs.copyfile(src_filepath, dst_filename) >+ fs.copyfile(src_filepath, dst_filepath) >diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py b/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py >index 8abde35a67581cb0853dfdad9ea682abc50fb791..c3521ec999411f6178f106f7c5f5ff39283c53c9 100644 >--- a/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py >+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py >@@ -186,6 +186,9 @@ class FailureImageHashIncorrect(TestFailure): > class FailureReftestMismatch(TestFailure): > """The result didn't match the reference rendering.""" > >+ def __init__(self, reference_filename): >+ self.reference_filename = reference_filename >+ > @staticmethod > def message(): > return "Mismatch with reference" >@@ -194,6 +197,9 @@ class FailureReftestMismatch(TestFailure): > class FailureReftestMismatchDidNotOccur(TestFailure): > """Unexpected match between the result and the reference rendering.""" > >+ def __init__(self, reference_filename): >+ self.reference_filename = reference_filename >+ > @staticmethod > def message(): > return "Mismatch with the reference did not occur"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 71567
:
113677
|
114202