Bug 273235 - REGRESSION(277673@main+): [import-w3c-tests] -ref.html files are no longer imported
Summary: REGRESSION(277673@main+): [import-w3c-tests] -ref.html files are no longer im...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-04-25 00:25 PDT by Tim Nguyen (:ntim)
Modified: 2024-05-02 11:11 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Nguyen (:ntim) 2024-04-25 00:25:29 PDT
...
Comment 1 Radar WebKit Bug Importer 2024-04-25 00:25:41 PDT
<rdar://problem/127035082>
Comment 2 Sam Sneddon [:gsnedders] 2024-05-01 17:12:08 PDT
From the old code:

```
    def is_reference_filename(self):
        # From tools/manifest/sourcefile.py in WPT repository
        # https://github.com/web-platform-tests/wpt/blob/22f29564bb82b407aeaf6507c8efffdbd51b9974/tools/manifest/sourcefile.py#L405
        reference_file_re = re.compile(r'(^|[\-_])(not)?ref[0-9]*([\-_]|$)')
        return "/reference/" in self.filename or bool(reference_file_re.search(self.filename))
```

(Introduced in bug 234510)

The WPT code this is copied from has the filename without the extension at this point, which means it matches `foo-ref` but not `foo-ref.html`; as such, we concluded `foo-ref.html` wasn't a reference and imported it as a support file. *However* we do correctly check for `/reference/`, so we do sometimes exclude the original filename.

This was arguably a bug in the prior patch, as it was only after that we started importing both `-ref.html` and `-expected.html`.

So we've got two questions here:

1. What is the correct behaviour? Should we be importing both -ref.html and -expected.html? (Probably yes — in the git world this doesn't bloat the repo as the files are identical.)
2. If we want to import `-ref.html`, do we *also* want to import files in `reference`? (Probably also yes — the inconsistency is the weirdest part of this!)
Comment 3 Sam Sneddon [:gsnedders] 2024-05-01 17:59:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28025
Comment 4 EWS 2024-05-02 11:11:05 PDT
Committed 278271@main (ec1b41b9a866): <https://commits.webkit.org/278271@main>

Reviewed commits have been landed. Closing PR #28025 and removing active labels.