From 129ec1cb8413c559766d9fd3771857bf27e31120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 26 Sep 2023 16:27:04 +0200 Subject: [PATCH] test: Propagate Xwayland stdout/stderr output and exit status If waiting for weston to start times out. This should make it easier to diagnose issues. --- test/scripts/xwayland-piglit.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/scripts/xwayland-piglit.sh b/test/scripts/xwayland-piglit.sh index 42209e8ab..97a1759d9 100755 --- a/test/scripts/xwayland-piglit.sh +++ b/test/scripts/xwayland-piglit.sh @@ -23,7 +23,11 @@ export WAYLAND_DISPLAY=wayland-$$ trap 'kill $WESTON_PID' EXIT # Wait for weston to initialize before starting Xwayland -timeout --preserve-status 5s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 &>/dev/null; do sleep 1; done" +if ! timeout 5s bash -c "while ! $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 &>/dev/null; do sleep 1; done"; then + # Try running Xwayland one more time, so we can propagate its stdout/stderr + # output and exit status + $XSERVER_BUILDDIR/hw/xwayland/Xwayland -pogo -displayfd 1 +fi # Start an Xwayland server export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xwayland