Module: Mesa
Branch: main
Commit: e17535829372d4f43969a89388c6c7bc1a171029
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=e17535829372d4f43969a89388c6c7bc1a171029

Author: David Heidelberg <david.heidelb...@collabora.com>
Date:   Sat Jul  8 13:14:58 2023 +0200

ci/traces: switch from xvfb to Weston XWayland

 - Drop now unused RUN_CMD_WRAPPER.
 - Copy-paste Weston initiation code from init-stage2.sh with slightly 
adjustments.

Reviewed-by: Daniel Stone <dani...@collabora.com>
Signed-off-by: David Heidelberg <david.heidelb...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24056>

---

 .gitlab-ci/piglit/piglit-traces.sh | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci/piglit/piglit-traces.sh 
b/.gitlab-ci/piglit/piglit-traces.sh
index 8bb9b902838..06214b9aa7c 100755
--- a/.gitlab-ci/piglit/piglit-traces.sh
+++ b/.gitlab-ci/piglit/piglit-traces.sh
@@ -100,7 +100,19 @@ elif [ "$PIGLIT_PLATFORM" = "mixed_glx_egl" ]; then
     SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl"
 else
     SANITY_MESA_VERSION_CMD="$SANITY_MESA_VERSION_CMD --platform glx --api gl 
--profile core"
-    RUN_CMD_WRAPPER="xvfb-run --server-args=\"-noreset\" sh -c"
+    # copy-paste from init-stage2.sh, please update accordingly
+    {
+      WESTON_X11_SOCK="/tmp/.X11-unix/X0"
+      export WAYLAND_DISPLAY=wayland-0
+      export DISPLAY=:0
+      mkdir -p /tmp/.X11-unix
+
+      env \
+        VK_ICD_FILENAMES="/install/share/vulkan/icd.d/${VK_DRIVER}_icd.$(uname 
-m).json" \
+       weston -Bheadless-backend.so --use-gl -Swayland-0 --xwayland 
--idle-time=0 &
+
+      while [ ! -S "$WESTON_X11_SOCK" ]; do sleep 1; done
+    }
 fi
 
 # If the job is parallel at the  gitlab job level, will take the corresponding
@@ -161,10 +173,6 @@ PIGLIT_CMD="./piglit run -l verbose --timeout 300 
-j${FDO_CI_CONCURRENT:-4} $PIG
 
 RUN_CMD="export LD_LIBRARY_PATH=$__LD_LIBRARY_PATH; $SANITY_MESA_VERSION_CMD 
&& $HANG_DETECTION_CMD $PIGLIT_CMD"
 
-if [ "$RUN_CMD_WRAPPER" ]; then
-    RUN_CMD="set +e; $RUN_CMD_WRAPPER \"$(/usr/bin/printf "%q" "$RUN_CMD")\"; 
set -e"
-fi
-
 # The replayer doesn't do any size or checksum verification for the traces in
 # the replayer db, so if we had to restart the system due to intermittent 
device
 # errors (or tried to cache replayer-db between runs, which would be nice to

Reply via email to