-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[GTK][WPE][OpenXR] Allow running API tests without DMA buf support #51318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GTK][WPE][OpenXR] Allow running API tests without DMA buf support #51318
Conversation
|
EWS run on previous version of this PR (hash dcd326f) Details |
dcd326f to
b29f009
Compare
|
EWS run on previous version of this PR (hash b29f009) Details |
|
I am not sure why there are these 3 failures in the WebKitGTK bot: They are OK when run locally with webkit-container-sdk-bots infrastructure. Maybe it's something only exposed with flatpak? |
Oh, I should have seen. These are now failing in other PRs: https://ews-build.webkit.org/#/builders/21 |
b29f009 to
4991232
Compare
|
EWS run on previous version of this PR (hash 4991232) Details |
aperezdc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have just one minor nit, otherwise I think this is okay.
| static WebKitFeature* findFeature(WebKitFeatureList *featureList, const char *identifier) | ||
| { | ||
| for (gsize i = 0; i < webkit_feature_list_get_length(featureList); i++) { | ||
| WebKitFeature* feature = webkit_feature_list_get(featureList, i); | ||
| if (!g_ascii_strcasecmp(identifier, webkit_feature_get_identifier(feature))) | ||
| return feature; | ||
| } | ||
| return nullptr; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen similar functions in a few places (MiniBrowser, Cog, etc.) to find a WebKitFeature given its name. I think at some point we should add a webkit_settings_find_feature() and/or webkit_feature_list_find() functions to the public API... but that would be something to do another day.
4991232 to
e344223
Compare
|
EWS run on previous version of this PR (hash e344223) Details |
e344223 to
4e95933
Compare
|
EWS run on current version of this PR (hash 4e95933) Details |
https://bugs.webkit.org/show_bug.cgi?id=299525 Reviewed by Carlos Garcia Campos and Adrian Perez de Castro. When an OpenXR coordinator is initializing, it requires the MESA_image_dma_buf_export extension. However, when running tests headless, like what we do in most bots, that extension is not available. This change adds an internal web preference, OpenXRDMABufRelaxedForTesting, (defaulting to false and only available when building on developer mode) that lets the OpenXR coordinator accept displays without that extension. This is enough to run API tests with a headless environment and a null compositor. Validating this change on the bots exposed a few additional things: the tests can now run regardless of the value of LIBGL_ALWAYS_SOFTWARE, and they need XR_RUNTIME_JSON to be defined in order to find the runtime details. Test: Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebXR.cpp * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: the new internal preference allowing to relax the extension check. * Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.cpp: (WebKit::OpenXRCoordinator::getPrimaryDeviceInfo): Use the page proxy to query the preferences, and pass it into initializeDevice. (WebKit::OpenXRCoordinator::createGLDisplay const): Pass and use an "isTesting" boolean. (WebKit::OpenXRCoordinator::initializeDevice): Pass an isTesting boolean. * Source/WebKit/UIProcess/XR/openxr/PlatformXROpenXR.h: * Tools/Scripts/webkitpy/port/monadodriver.py: (MonadoDriver._get_runtime_path): (MonadoDriver._setup_environ_for_test): * Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebXR.cpp: (findFeature): helper function to get the web preference. (relaxDMABufRequirement): helper function that enables a setting relaxing the DMA-BUF requirement. (WebXRTest::WebXRTest): relax the requirement by default in all WebXR tests. (testWebKitWebXRLeaveImmersiveModeAndWaitUntilImmersiveModeChanged): use the new settings before loading the test. (testWebKitXRPermissionRequest): Ditto. * Tools/glib/api_test_runner.py: (TestRunner._run_test_glib): Canonical link: https://commits.webkit.org/301203@main
4e95933 to
a9128cb
Compare
|
Committed 301203@main (a9128cb): https://commits.webkit.org/301203@main Reviewed commits have been landed. Closing PR #51318 and removing active labels. |
🧪 services
a9128cb
4e95933
🧪 win-tests🧪 mac-AS-debug-wk2