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.
This commit is contained in:
Michel Dänzer 2023-09-26 16:27:04 +02:00 committed by Michel Dänzer
parent e58203c1e2
commit 129ec1cb84

View File

@ -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