ci: cleanup weston invocations

Specifically, set WAYLAND_DISPLAY only once and reuse the var, don't
export it to weston itself (even though it's ignored because we
explicitly select the headless backend instead of auto), use long option
names for added clarity, and replace deprecated `--use-gl` with
`--renderer=gl`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36485>
This commit is contained in:
Eric Engestrom 2025-07-30 12:06:09 +02:00 committed by Marge Bot
parent b4791424b3
commit 62857757a9
3 changed files with 9 additions and 6 deletions

View file

@ -192,14 +192,15 @@ if [ -n "$HWCI_START_WESTON" ]; then
echo "Please consider dropping HWCI_START_XORG and instead using Weston XWayland for testing."
WESTON_X11_SOCK="/tmp/.X11-unix/X1"
fi
export WAYLAND_DISPLAY=wayland-0
WAYLAND_DISPLAY=wayland-0
# Display server is Weston Xwayland when HWCI_START_XORG is not set or Xorg when it's
export DISPLAY=:0
mkdir -p /tmp/.X11-unix
env weston --config="/install/common/weston.ini" -Swayland-0 --use-gl &
weston --config="/install/common/weston.ini" --socket="$WAYLAND_DISPLAY" --renderer=gl &
BACKGROUND_PIDS="$! $BACKGROUND_PIDS"
export WAYLAND_DISPLAY
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
fi

View file

@ -93,11 +93,12 @@ else
# copy-paste from init-stage2.sh, please update accordingly
{
WESTON_X11_SOCK="/tmp/.X11-unix/X0"
export WAYLAND_DISPLAY=wayland-0
WAYLAND_DISPLAY=wayland-0
export DISPLAY=:0
mkdir -p /tmp/.X11-unix
env weston --config="/install/common/weston.ini" -Swayland-0 --use-gl &
weston --config="/install/common/weston.ini" --socket="$WAYLAND_DISPLAY" --renderer=gl &
export WAYLAND_DISPLAY
while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
}

View file

@ -42,8 +42,9 @@ llvmpipe:
export LD_LIBRARY_PATH="$CI_PROJECT_DIR/install/lib"
export LIBGL_DRIVERS_PATH="$CI_PROJECT_DIR/install/lib/dri"
section_start weston "weston: prepare"
weston -Bheadless-backend.so -Swayland-0 --idle-time=0 &
export WAYLAND_DISPLAY=wayland-0
WAYLAND_DISPLAY=wayland-0
weston --backend=headless-backend.so --socket="$WAYLAND_DISPLAY" --idle-time=0 &
export WAYLAND_DISPLAY
section_end weston
xvfb-run -e results/xvfb.log --server-args='-noreset' bash -c ". $SCRIPTS_DIR/setup-test-env.sh && ${XVFB_SCRIPT}"