Skip to content

Commit

Permalink
Minor cleanups for Wayland testbed testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rmartin16 committed Jun 21, 2024
1 parent 4d5ac26 commit ff60b14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ 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
Expand All @@ -244,23 +244,20 @@ jobs:
pre-command: |
sudo apt update -y
sudo apt install -y --no-install-recommends \
mutter libjpeg-dev \
pkg-config python3-dev libgirepository1.0-dev libcairo2-dev gir1.2-webkit2-4.1
mutter 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 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
# Bypass guardrails for installing over system packages
export PIP_BREAK_SYSTEM_PACKAGES=1
export PIP_IGNORE_INSTALLED=1
briefcase-run-prefix: "WAYLAND_DISPLAY=toga"
setup-python: false # Use the system Python packages
app-user-data-path: "$HOME/.local/share/testbed"
Expand Down
2 changes: 1 addition & 1 deletion testbed/tests/testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def run_tests(app, cov, args, report_coverage, run_slow, running_in_ci):
cov.set_option(
"coverage_conditional_plugin:rules",
{
"no-cover-if-linux-wayland": "os_environ.get('WAYLAND_DISPLAY') != ''",
"no-cover-if-linux-wayland": "os_environ.get('WAYLAND_DISPLAY', '') != ''",
"no-cover-if-linux-x": "os_environ.get('WAYLAND_DISPLAY', 'not-set') == 'not-set'",
},
)
Expand Down
2 changes: 1 addition & 1 deletion testbed/tests/widgets/test_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ async def test_write_text(canvas, probe):

@pytest.mark.xfail(
condition=os.environ.get("RUNNING_IN_CI") != "true",
reason="may fail outside of CI",
reason="may fail outside of a GitHub runner environment",
)
async def test_multiline_text(canvas, probe):
"Multiline text can be measured and written"
Expand Down

0 comments on commit ff60b14

Please sign in to comment.