WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
314595
[CMake] TestWebKitAPI on Mac doesn't bundle nested resource directories
https://bugs.webkit.org/show_bug.cgi?id=314595
Summary
[CMake] TestWebKitAPI on Mac doesn't bundle nested resource directories
zak ridouh
Reported
2026-05-11 17:00:06 PDT
The CMake build of TestWebKitAPI on the Mac port stages test resources into TestWebKitAPIResources.bundle using a flat file(GLOB) on Resources/*.* and Resources/cocoa/*.*, then copies the matching files (flattened) into the bundle root. This misses two categories of resources: 1. Files in nested subdirectories under Resources/cocoa/, e.g.: - Resources/cocoa/web-extension/{manifest.json, _locales/en/messages.json, images/*, ...} - Resources/cocoa/web-extension-mac.appex/Contents/{Info.plist, _CodeSignature/CodeResources, MacOS/..., Resources/...} - Resources/cocoa/web-extension-ios.appex/... - Resources/cocoa/TestModalContainerControls.mlmodelc/... 2. Top-level files whose names do not contain a "." (the *.* glob requires a dot), e.g. Resources/cocoa/invalidDeviceIDHashSalts. As a result, the following API tests fail when run against the CMake build at WebKitBuild/cmake-mac/Debug/ even though the test binaries themselves compile and link cleanly: - TestWebKitAPI.WKWebExtension.LoadFromDirectory - TestWebKitAPI.WKWebExtension.LoadFromDirectoryWithoutTrailingSlash - TestWebKitAPI.WKWebExtension.LoadFromMacAppExtensionBundle - TestWebKitAPI.WKWebExtension.LoadFromiOSAppExtensionBundle - TestWebKitAPI.WebKit.InvalidDeviceIdHashSalts These tests load a directory as a bundle via -[NSBundle URLForResource:withExtension:@""] (or load a dotless filename) and return nil because the resource isn't present at runtime. The Xcode build is unaffected because it uses xcconfig-driven Copy Files phases that preserve directory structure. PlatformMac.cmake should stage Resources/ and Resources/cocoa/ recursively, preserving directory structure under cocoa/ (with the cocoa/ prefix stripped so URLForResource: lookups continue to resolve), and including dotless filenames. Resources/glib/ should remain excluded on the Mac port.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-05-11 17:00:13 PDT
<
rdar://problem/176834169
>
zak ridouh
Comment 2
2026-05-11 17:01:31 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/64714
EWS
Comment 3
2026-05-11 17:51:30 PDT
Committed
313044@main
(cdc76f4dc73b): <
https://commits.webkit.org/313044@main
> Reviewed commits have been landed. Closing PR #64714 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug