summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2023-03-22 11:31:03 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2023-03-27 08:55:30 +0200
commit9e52a28be8aa763e1005f05affc7cef3c4219989 (patch)
tree4f384718b5e1de2a7875ab51d282632806d6a577
parentd2e27b0a8c05efe56a4179d053c0258f95d3772f (diff)
test: Use either wayland-info or weston-infoxwayland-22.1
weston-info has been deprecated for quite some time, whereas wayland-info may not be available yet. So we use either, depending on what's actually available. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> (cherry picked from commit fc625fe172d9f6a149a594b5214364bedf680239)
-rwxr-xr-xtest/scripts/xwayland-piglit.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/scripts/xwayland-piglit.sh b/test/scripts/xwayland-piglit.sh
index a898008eb..59955900e 100755
--- a/test/scripts/xwayland-piglit.sh
+++ b/test/scripts/xwayland-piglit.sh
@@ -17,8 +17,13 @@ weston --no-config --backend=headless-backend.so --socket=wayland-$$ &
WESTON_PID=$!
export WAYLAND_DISPLAY=wayland-$$
+# We can use either wayland-info or weston-info (deprecated), depending
+# on what's actually available.
+WAYLAND_INFO=wayland-info
+command -V $WAYLAND_INFO >/dev/null 2>&1 || WAYLAND_INFO=weston-info
+
# Wait for weston to initialize before starting Xwayland
-timeout --preserve-status 60s bash -c 'while ! weston-info &>/dev/null; do sleep 1; done'
+timeout --preserve-status 60s bash -c "while ! $WAYLAND_INFO &>/dev/null; do sleep 1; done"
# Start an Xwayland server
export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xwayland