On Sat, 20 Dec 2025 at 16:21:58 +0000, Simon McVittie wrote:
A workaround that I have confirmed does work is to run the test with
SDL_VIDEODRIVER="offscreen" (or "dummy" or "offscreen,dummy"), so in the
short term please consider applying the attached patch.
Sorry, this was insufficiently tested. SDL_VIDEODRIVER=offscreen or
SDL_VIDEODRIVER=dummy does work, but SDL_VIDEODRIVER=offscreen,dummy
does not. Fixed patch attached.
Or perhaps wesnoth could call SDL_SetHint(SDL_HINT_VIDEODRIVER, "offscreen")
(or "dummy", or "offscreen,dummy") when invoked with --nogui or equivalent?
Similarly this would have to choose either offscreen or dummy, it cannot
easily try both.
smcv
>From a50a5c16e111462120f07e43559871c0eeca109c Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 20 Dec 2025 16:17:18 +0000
Subject: [PATCH] d/tests/control.in: Explicitly use offscreen video driver
In a CI environment we can't expect to have a working X11 display or
Wayland compositor unless we explicitly run one, which this test
does not. In "classic" SDL2 this was masked by the offscreen video
driver being enabled by default, but in SDL3 + sdl2-compat the offscreen
video driver is only used if it is specifically requested, with the
reasonable justification that video drivers that don't show any pixels
to the user are only rarely what is wanted.
Closes: #1123731
---
debian/tests/control | 2 +-
debian/tests/control.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/debian/tests/control b/debian/tests/control
index 12a7dad6ad5..b9cb0103116 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,6 +1,6 @@
# Inspired by upstream CI script utils/CI/play_test_executor.sh
# This runs wesnoth with a multiplayer AI-only matchup.
-Test-Command: /usr/games/wesnoth-1.18 -m --controller 1:ai --controller 2:ai --nogui
+Test-Command: SDL_VIDEODRIVER=offscreen /usr/games/wesnoth-1.18 -m --controller 1:ai --controller 2:ai --nogui
Depends:
wesnoth-1.18,
xauth,
diff --git a/debian/tests/control.in b/debian/tests/control.in
index 582ad1ce727..52b277dac37 100644
--- a/debian/tests/control.in
+++ b/debian/tests/control.in
@@ -1,6 +1,6 @@
# Inspired by upstream CI script utils/CI/play_test_executor.sh
# This runs wesnoth with a multiplayer AI-only matchup.
-Test-Command: /usr/games/wesnoth-BRANCH -m --controller 1:ai --controller 2:ai --nogui
+Test-Command: SDL_VIDEODRIVER=offscreen /usr/games/wesnoth-BRANCH -m --controller 1:ai --controller 2:ai --nogui
Depends:
wesnoth-BRANCH,
xauth,
--
2.51.0