From 9a1efd34df5a681b91ebd2cb4115121137bceab7 Mon Sep 17 00:00:00 2001 From: Angel Mankel Date: Tue, 28 Jul 2026 08:01:23 +0000 Subject: [PATCH] tests: run the render test from the single entry point Skips cleanly when a client, Xvfb or ImageMagick is unavailable. --- host/tests/run-tests.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/host/tests/run-tests.sh b/host/tests/run-tests.sh index c9106e58..05064653 100755 --- a/host/tests/run-tests.sh +++ b/host/tests/run-tests.sh @@ -79,6 +79,34 @@ kill "$HOST_PID" 2>/dev/null wait "$HOST_PID" 2>/dev/null rm -f "$SHM" +CLIENT_BIN="$ROOT/client/build/looking-glass-client" +if [ -x "$CLIENT_BIN" ] && command -v Xvfb >/dev/null && \ + command -v convert >/dev/null; then + echo + echo "==============================================" + echo " render test: client composition" + echo "==============================================" + + if ! gcc -O2 -msse4.1 -o "$OUT/lg-fake-host" host/tests/lg-fake-host.c \ + -I common/include -I repos/LGMP/lgmp/include -I host/include -I . \ + -Wl,--start-group \ + host/build/common/liblg_common.a \ + host/build/common/src/platform/linux/liblg_common_platform_code.a \ + host/build/lgmp/liblgmp.a \ + -Wl,--end-group \ + -lpthread -lrt -lbfd 2>"$OUT/fake-build.log"; then + echo "FAILED to build the synthetic host:" + tail -5 "$OUT/fake-build.log" + RC=1 + else + host/tests/test-compose.sh "$OUT/lg-fake-host" "$CLIENT_BIN" \ + "$OUT/compose" || RC=1 + fi +else + echo + echo "skipping the render test: needs a built client, Xvfb and ImageMagick" +fi + echo if [ $RC -eq 0 ]; then echo "ALL TESTS PASSED"