⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287790 in webkit


Ignore:
Timestamp:
Jan 7, 2022, 3:19:31 PM (5 years ago)
Author:
timothy_horton@apple.com
Message:

A/B comparison tests fail trying to look up fuzzy match tolerance
https://bugs.webkit.org/show_bug.cgi?id=234974

Reviewed by Aditya Keerthi.

  • Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:

(SingleTestRunner._run_self_comparison_test):
(SingleTestRunner._compare_output_with_reference):
Disable fuzzy matching for A/B tests, because A) we don't really want it
and B) it crashes run-webkit-tests because there is no actual reference file
in which to find the tolerance value.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r287789 r287790  
     12022-01-07  Tim Horton  <timothy_horton@apple.com>
     2
     3        A/B comparison tests fail trying to look up fuzzy match tolerance
     4        https://bugs.webkit.org/show_bug.cgi?id=234974
     5
     6        Reviewed by Aditya Keerthi.
     7
     8        * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
     9        (SingleTestRunner._run_self_comparison_test):
     10        (SingleTestRunner._compare_output_with_reference):
     11        Disable fuzzy matching for A/B tests, because A) we don't really want it
     12        and B) it crashes run-webkit-tests because there is no actual reference file
     13        in which to find the tolerance value.
     14
    1152022-01-07  David Kilzer  <ddkilzer@apple.com>
    216
  • trunk/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py

    r287323 r287790  
    350350
    351351        test_full_path = self._port.abspath_for_test(self._test_name)
    352         test_result = self._compare_output_with_reference(reference_output, test_output, test_full_path, False)
     352        test_result = self._compare_output_with_reference(reference_output, test_output, test_full_path, False, allow_fuzzy_tolerance=False)
    353353
    354354        assert(reference_output)
     
    396396        return actualMaxDifference >= maxDifferenceMin and actualMaxDifference <= maxDifferenceMax and actualTotalPixels >= totalPixelsMin and actualTotalPixels <= totalPixelsMax
    397397
    398     def _compare_output_with_reference(self, reference_driver_output, actual_driver_output, reference_filename, mismatch):
     398    def _compare_output_with_reference(self, reference_driver_output, actual_driver_output, reference_filename, mismatch, allow_fuzzy_tolerance=True):
    399399        total_test_time = reference_driver_output.test_time + actual_driver_output.test_time
    400400        has_stderr = reference_driver_output.has_stderr() or actual_driver_output.has_stderr()
     
    412412            failures.append(test_failures.FailureReftestNoImagesGenerated(reference_filename))
    413413        elif mismatch:
    414             fuzzy_tolerance = self._fuzzy_tolerance_for_reference(reference_filename)
     414            fuzzy_tolerance = None
     415            if allow_fuzzy_tolerance:
     416                fuzzy_tolerance = self._fuzzy_tolerance_for_reference(reference_filename)
    415417            if fuzzy_tolerance:
    416418                diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image, tolerance=0)
     
    429431            diff_result = self._port.diff_image(reference_driver_output.image, actual_driver_output.image, tolerance=0)
    430432
    431             fuzzy_tolerance = self._fuzzy_tolerance_for_reference(reference_filename)
     433            fuzzy_tolerance = None
     434            if allow_fuzzy_tolerance:
     435                fuzzy_tolerance = self._fuzzy_tolerance_for_reference(reference_filename)
    432436            if fuzzy_tolerance:
    433437                diff_result.passed = self._test_passes_fuzzy_matching(fuzzy_tolerance, diff_result.fuzzy_data)
Note: See TracChangeset for help on using the changeset viewer.