-
-
Notifications
You must be signed in to change notification settings - Fork 671
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
Run testbed with Wayland #2670
Merged
Merged
Run testbed with Wayland #2670
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0ebb9ab
Run testbed with Wayland
rmartin16 f6cce23
Update `test_current_window` for testbed on Wayland
rmartin16 05e8c0e
Fix window visibility and minimize testbed tests for Wayland
rmartin16 10e9e65
Test Wayland on Ubuntu 22.04
rmartin16 e51310f
Fix canvas testbed tests for Wayland
rmartin16 150d32a
Fix testbed coverage for Wayland on Linux
rmartin16 4d5ac26
Allow canvas test `test_multiline_text` to fail outside CI
rmartin16 ff60b14
Minor cleanups for Wayland testbed testing
rmartin16 a1df8d4
Simplify abstracted current window assertion in testbed
rmartin16 ca8a068
Label original Linux multiline_text reference image as x11
rmartin16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -188,7 +188,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
backend: [ "macOS-x86_64", "macOS-arm64", "windows", "linux", "android", "iOS" ] | ||
backend: [ "macOS-x86_64", "macOS-arm64", "windows", "linux-x11", "linux-wayland","android", "iOS" ] | ||
include: | ||
- pre-command: "" | ||
briefcase-run-prefix: "" | ||
|
@@ -208,7 +208,7 @@ jobs: | |
# We use a fixed Ubuntu version rather than `-latest` because at some point, | ||
# `-latest` will be updated, but it will be a soft changeover, which would cause | ||
# the system Python version to become inconsistent from run to run. | ||
- backend: "linux" | ||
- backend: "linux-x11" | ||
platform: "linux" | ||
runs-on: "ubuntu-22.04" | ||
# The package list should be the same as in tutorial-0.rst, and the BeeWare | ||
|
@@ -223,19 +223,45 @@ jobs: | |
sudo apt install -y --no-install-recommends \ | ||
blackbox pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.1 | ||
|
||
# Start Virtual X server | ||
# Start Virtual X Server | ||
echo "Start X server..." | ||
Xvfb :99 -screen 0 2048x1536x24 & | ||
sleep 1 | ||
|
||
# Start Window manager | ||
# Start Window Mmanager | ||
echo "Start window manager..." | ||
DISPLAY=:99 blackbox & | ||
sleep 1 | ||
briefcase-run-prefix: 'DISPLAY=:99' | ||
setup-python: false # Use the system Python packages | ||
app-user-data-path: "$HOME/.local/share/testbed" | ||
|
||
- backend: "linux-wayland" | ||
platform: "linux" | ||
runs-on: "ubuntu-22.04" | ||
# The package list should be the same as in tutorial-0.rst, and the BeeWare | ||
# tutorial, plus mutter to provide a window manager, and libjpeg-dev for Pillow. | ||
pre-command: | | ||
sudo apt update -y | ||
sudo apt install -y --no-install-recommends \ | ||
mutter pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.1 | ||
|
||
# Start Virtual X Server | ||
echo "Start X server..." | ||
Xvfb :99 -screen 0 2048x1536x24 & | ||
sleep 1 | ||
|
||
# Start Window Manager | ||
echo "Start window manager..." | ||
# mutter is being run inside a virtual X server because mutter's headless | ||
# mode is not compatible with Gtk | ||
DISPLAY=:99 MUTTER_DEBUG_DUMMY_MODE_SPECS=2048x1536 \ | ||
mutter --nested --wayland --no-x11 --wayland-display toga & | ||
sleep 1 | ||
briefcase-run-prefix: "WAYLAND_DISPLAY=toga" | ||
setup-python: false # Use the system Python packages | ||
app-user-data-path: "$HOME/.local/share/testbed" | ||
|
||
- backend: "windows" | ||
platform: "windows" | ||
runs-on: "windows-latest" | ||
|
@@ -258,7 +284,7 @@ jobs: | |
platform: "android" | ||
runs-on: "ubuntu-latest" | ||
briefcase-run-prefix: JAVA_HOME=${JAVA_HOME_17_X64} | ||
briefcase-run-args: > | ||
briefcase-run-args: >- | ||
--device '{"avd":"beePhone","skin":"pixel_3a"}' | ||
--Xemulator=-no-window | ||
--Xemulator=-no-snapshot | ||
|
@@ -304,7 +330,7 @@ jobs: | |
timeout-minutes: 15 | ||
run: | | ||
${{ matrix.briefcase-run-prefix }} \ | ||
briefcase run ${{ matrix.platform }} --log --test ${{ matrix.briefcase-run-args }} | ||
briefcase run ${{ matrix.platform }} --log --test ${{ matrix.briefcase-run-args }} -- --ci | ||
|
||
- name: Upload Logs | ||
uses: actions/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add Wayland to the matrix for testbed CI testing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is left as blanket "no cover" because the probe prevents fetching an image for the screen if running on Wayland. However, I imagine that's because Toga crashes out if this code is ever actually ran in practice....because the
Screen.as_image()
API incore
sends the returnedNone
in totoga.Image
. This may not be the best UX...especially since developers may never test on Wayland before shipping...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.
Agreed it's not ideal UX; returning a dummy image (blank, same size as the screen?) may be preferable. Up to you whether you roll that into this PR, or log it as a standalone issue.
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 created #2673 to capture this.