Bug 264735

Summary: [import-w3c-tests] deleting generic -expected files when platform-specific baselines exist
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Sam Sneddon [:gsnedders] <gsnedders>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Sam Sneddon [:gsnedders] 2023-11-13 05:36:39 PST
https://github.com/WebKit/WebKit/pull/20412 started off with `./Tools/Scripts/import-w3c-tests -s ~/projects/wpt/wpt-clean --clean-dest-dir web-platform-tests/dom`, which deleted `LayoutTests/imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window-expected.txt`. However, `LayoutTests/imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window.html` still exists. This is wrong and bad.
Comment 1 Radar WebKit Bug Importer 2023-11-13 05:36:51 PST
<rdar://problem/118329279>
Comment 2 Sam Sneddon [:gsnedders] 2023-11-13 06:04:48 PST
(Pdb) 'imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window.html' in {test.test_path for test in tests}
True
(Pdb) 'imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window-expected.txt' in baselines_for_tests
False
(Pdb) pp self.port.expected_filename("imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window.html", ".txt")
'/Volumes/gsnedders/projects/Safari/OpenSource/LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/dom/events/non-cancelable-when-passive/passive-wheel-event-listener-on-window-expected.txt'

We're confused because we have a baseline in the platform directory.
Comment 3 Sam Sneddon [:gsnedders] 2023-11-16 06:17:44 PST
Ah, because we always prune baselines, this doesn't actually require --clean-dest-dir.

Patch forthcoming.
Comment 4 Sam Sneddon [:gsnedders] 2023-11-16 06:58:12 PST
Pull request: https://github.com/WebKit/WebKit/pull/20603
Comment 5 EWS 2023-11-17 10:01:12 PST
Committed 270899@main (69c47f823b0e): <https://commits.webkit.org/270899@main>

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