#49908: ci: Wayland test job, helpers, and app spec
Merged
Description of Change
Refs electron/build-images#55.
Fixes #48441.
This PR adds basic test coverage for Wayland, which is now the default display protocol in most major Linux distributions.
- New
test-waylandjob: this job only runs on Linux x64 for now. It could also be set up as a variation of the existing test job, but I wanted to keep things separate at first. The job depends on the weston compositor to exist in the image: electron/build-images#55. - Chromium patch: the patch prevents the test script from crashing on teardown in the minimal Weston environment. (Chrome itself works around this with a custom build of Weston.) It is a simple safety check which will also be submitted upstream.
- Wayland test spec allowlist: not all tests pass on Wayland, and many are not important since they do not care about the display server. I added
api-app-spec.tsfor now as it's a great indicator for "does the app launch"? The biggest win for regression testing will be the browser window spec, but that will take a decent amount of work. - isWayland helper: within allowed test specs, some will still need to be filtered out for compatibility. I added this to two tests in app.ts, one which is already skipped on CI anyway, and another which is probably a legitimate Wayland bug.
You can test on Linux by installing the deps (weston and wlheadless-run) and then running:
./script/actions/run-tests-wayland.sh e test --runners=main --files spec/api-app-spec.ts.
Checklist
- PR description included
- I have built and tested this PR
-
npm testpasses - tests are changed or added
- relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: none
Backports
No Backports Requested
This pull request doesn't have any backports requested or created for older release branches.
What are backports?
Backports are copies of changes made to the main branch that are applied to older release branches. They ensure that bug fixes and important changes are available in maintained older versions of Electron.
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron