[webkit-changes] [WebKit/WebKit] ec1b41: [import-w3c-tests] references should be imported a...

Sam Sneddon noreply at github.com
Thu May 2 11:11:24 PDT 2024


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

  Changed paths:
    M Tools/Scripts/webkitpy/w3c/test_importer.py
    M Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
    M Tools/Scripts/webkitpy/w3c/test_parser.py
    M Tools/Scripts/webkitpy/w3c/test_parser_unittest.py

  Log Message:
  -----------
  [import-w3c-tests] references should be imported as their original filename too
https://bugs.webkit.org/show_bug.cgi?id=273235

Reviewed by Tim Nguyen.

Prior to 277673 at main we did import _some_ references under their
original name, as well as copying them to -expected.html.

In that commit, we inadvertently stopped the copying; it was somewhat
surprising behaviour of the existing code that led to some of them being
copied, and arguably a bug, and the obvious rewrite of it led to them
being excluded again.

However, preserving both the original and r-w-t style filenames provides
a clearer path to running the tests based on their <link rel=match>,
thus there is a good reason to do this. (And with git being based on
content addressable storage, there is little cost in duplicating the
files.)

This removes the branch that was always intended to exclude them, and
adds tests to verify we have the now-intended behaviour.

With that now done, the only usage of the `referencefile` metadata is
to exclude reftests which point at themself as the reference, which is
behaviour upstream WPT doesn't prohibit (but is clearly meaningless!),
so we may as well get rid of the `referencefile` metadata entirely and
just treat references identically to support files.

* Tools/Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.find_importable_tests):
* Tools/Scripts/webkitpy/w3c/test_importer_unittest.py:
* Tools/Scripts/webkitpy/w3c/test_parser.py:
(TestParser.analyze_test):
* Tools/Scripts/webkitpy/w3c/test_parser_unittest.py:
(test_reference_self_reference):
(test_reference_name):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list