Title: [126189] trunk/Tools
Revision
126189
Author
[email protected]
Date
2012-08-21 14:39:43 -0700 (Tue, 21 Aug 2012)

Log Message

Text Autosizing: ::first-letter pseudo-element is incorrectly sized
https://bugs.webkit.org/show_bug.cgi?id=94540

Reviewed by Ojan Vafai.

Revert the changes in bugs 94517 and 94396 so that we are
actually looking for stderr output from ImageDiff and doing
image compares on ref tests on the wk2 ports again.

Also, do an actual diff_image() call if the hash checks fail on
reftests, and only fail the test if we get real diffs (or don't,
for mismatches).

Lastly, clean up the log messages to be more helpful.

* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(SingleTestRunner._compare_image):
(SingleTestRunner._compare_output_with_reference):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(write_test_result):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (126188 => 126189)


--- trunk/Tools/ChangeLog	2012-08-21 21:36:15 UTC (rev 126188)
+++ trunk/Tools/ChangeLog	2012-08-21 21:39:43 UTC (rev 126189)
@@ -1,5 +1,28 @@
 2012-08-21  Dirk Pranke  <[email protected]>
 
+        Text Autosizing: ::first-letter pseudo-element is incorrectly sized
+        https://bugs.webkit.org/show_bug.cgi?id=94540
+
+        Reviewed by Ojan Vafai.
+
+        Revert the changes in bugs 94517 and 94396 so that we are
+        actually looking for stderr output from ImageDiff and doing
+        image compares on ref tests on the wk2 ports again.
+
+        Also, do an actual diff_image() call if the hash checks fail on
+        reftests, and only fail the test if we get real diffs (or don't,
+        for mismatches).
+
+        Lastly, clean up the log messages to be more helpful.
+
+        * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+        (SingleTestRunner._compare_image):
+        (SingleTestRunner._compare_output_with_reference):
+        * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
+        (write_test_result):
+
+2012-08-21  Dirk Pranke  <[email protected]>
+
         _compare_image() swaps actual and expected images by mistake
         https://bugs.webkit.org/show_bug.cgi?id=94567
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py (126188 => 126189)


--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py	2012-08-21 21:36:15 UTC (rev 126188)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py	2012-08-21 21:39:43 UTC (rev 126189)
@@ -266,10 +266,7 @@
         elif driver_output.image_hash != expected_driver_output.image_hash:
             diff_result = self._port.diff_image(expected_driver_output.image, driver_output.image)
             err_str = diff_result[2]
-            # FIXME: see https://bugs.webkit.org/show_bug.cgi?id=94277 and
-            # https://bugs.webkit.org/show_bug.cgi?id=81962; ImageDiff doesn't
-            # seem to be working with WTR properly and tons of tests are failing.
-            if err_str and not self._options.webkit_test_runner:
+            if err_str:
                 _log.warning('  %s : %s' % (self._test_name, err_str))
                 failures.append(test_failures.FailureImageHashMismatch())
                 driver_output.error = (driver_output.error or '') + err_str
@@ -279,7 +276,7 @@
                     failures.append(test_failures.FailureImageHashMismatch(diff_result[1]))
                 else:
                     # See https://bugs.webkit.org/show_bug.cgi?id=69444 for why this isn't a full failure.
-                    _log.warning('  %s -> pixel hash failed (but pixel test still passes)' % self._test_name)
+                    _log.warning('  %s -> pixel hash failed (but diff passed)' % self._test_name)
         return failures
 
     def _run_reftest(self):
@@ -320,19 +317,21 @@
         if failures:
             return TestResult(self._test_name, failures, total_test_time, has_stderr)
 
-        if self._options.webkit_test_runner and not self._options.pixel_tests:
-            # don't check pixel results for WTR/WK2; they're broken.
-            return TestResult(self._test_name, failures, total_test_time, has_stderr)
-
         if not reference_driver_output.image_hash and not actual_driver_output.image_hash:
             failures.append(test_failures.FailureReftestNoImagesGenerated(reference_filename))
         elif mismatch:
             if reference_driver_output.image_hash == actual_driver_output.image_hash:
-                failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
+                diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image)
+                if not diff_result[0]:
+                    failures.append(test_failures.FailureReftestMismatchDidNotOccur(reference_filename))
+                else:
+                    _log.warning("  %s -> ref test hashes matched but diff failed" % self._test_name)
+
         elif reference_driver_output.image_hash != actual_driver_output.image_hash:
-            failures.append(test_failures.FailureReftestMismatch(reference_filename))
+            diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image)
+            if diff_result[0]:
+                failures.append(test_failures.FailureReftestMismatch(reference_filename))
+            else:
+                _log.warning("  %s -> ref test hashes didn't match but diff passed" % self._test_name)
 
-        # recompute in case we added to stderr during diff_image
-        has_stderr = reference_driver_output.has_stderr() or actual_driver_output.has_stderr()
-
         return TestResult(self._test_name, failures, total_test_time, has_stderr)

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py (126188 => 126189)


--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py	2012-08-21 21:36:15 UTC (rev 126188)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py	2012-08-21 21:39:43 UTC (rev 126189)
@@ -74,7 +74,7 @@
                     writer.write_image_diff_files(diff_image)
                     failure.diff_percent = diff_percent
                 else:
-                    _log.warn('Can not get image diff. ImageDiff program might not work correctly.')
+                    _log.warn('ref test mismatch did not produce an image diff.')
             writer.write_reftest(failure.reference_filename)
         elif isinstance(failure, test_failures.FailureReftestMismatchDidNotOccur):
             writer.write_image_files(driver_output.image, expected_image=None)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to