[webkit-changes] [WebKit/WebKit] 24f491: Increase LayoutTestFinder test coverage

Sam Sneddon noreply at github.com
Thu Feb 1 08:21:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 24f491ae94894b6c52376c9efb9b76ee817c5a9b
      https://github.com/WebKit/WebKit/commit/24f491ae94894b6c52376c9efb9b76ee817c5a9b
  Author: Sam Sneddon <gsnedders at apple.com>
  Date:   2024-02-01 (Thu, 01 Feb 2024)

  Changed paths:
    M Tools/Scripts/webkitpy/common/system/filesystem.py
    M Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py
    M Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py
    M Tools/Scripts/webkitpy/layout_tests/models/test.py
    M Tools/Scripts/webkitpy/port/base.py
    M Tools/Scripts/webkitpy/port/test.py

  Log Message:
  -----------
  Increase LayoutTestFinder test coverage
https://bugs.webkit.org/show_bug.cgi?id=268524

Reviewed by Jonathan Bedard.

As part of bug 220421, rewriting LayoutTestFinder, many new tests have
been written. However, these can stand on their own as a useful increase
in test coverage.

With this, a `with_expectations` argument is added to
LayoutTestFinder.find_tests which fully populates the Test object,
similar to the new implementation. This is not enabled by default as it
is very slow, having to read each directory many times.

This also makes some minor changes to ensure the tests reliably pass, at
least on non-Windows platforms. (Some of the LayoutTestFinder tests
already fail on Windows; these new tests continue to demonstrate
differences, which are almost all bugs in our current implementation.)

* Tools/Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.__init__): Avoid storing os.sep/os.pardir at import time, so that pyfakefs can rewrite them.
(FileSystem.remove): Ditto, but os.remove.
* Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy.py:
(LayoutTestFinder.find_tests): Add a with_expectations keyword argument that fully populates the Test object.
(LayoutTestFinder.find_tests_by_path): Ditto.
* Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:
(LayoutTestFinderTests.setUp):
(LayoutTestFinderTests.test_supported_test_extensions):
(LayoutTestFinderTests.test_includes_other_platforms_fallback):
(LayoutTestFinderTests.test_find_platform):
(LayoutTestFinderTests.test_find_platform_self):
(LayoutTestFinderTests.test_find_overridden):
(LayoutTestFinderTests):
(LayoutTestFinderTests.test_find_overridden_default):
(LayoutTestFinderTests.test_find_overridden_platform_self):
(LayoutTestFinderTests.test_find_overridden_platform_other):
* Tools/Scripts/webkitpy/layout_tests/models/test.py:
(Test): Fix defaults to be the correct types.
* Tools/Scripts/webkitpy/port/base.py:
(Port): Use a tuple, rather than a set, to give consistent enumeration order over _supported_reference_extensions.
* Tools/Scripts/webkitpy/port/test.py:

Canonical link: https://commits.webkit.org/273913@main




More information about the webkit-changes mailing list