ci: add xorg to the x86_test-vk container
authorAndres Gomez <agomez@igalia.com>
Thu, 22 Apr 2021 22:51:56 +0000 (01:51 +0300)
committerMarge Bot <eric+marge@anholt.net>
Sat, 22 May 2021 06:26:28 +0000 (06:26 +0000)
Only the AMD video drivers for xorg are added since there are no other
expected users by now.

v2:
  - Remove the start/stop logic from the x.sh script. We don't care
    about stopping since that's already managed by gitlab-ci (Emma).

v3:
  - Remove mistakenly added ".gitlab-ci/common/start-x.sh"
    script (Martin).

Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Martin Peres <martin.peres@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10856>

.gitlab-ci.yml
.gitlab-ci/common/start-x.sh [new file with mode: 0755]
.gitlab-ci/container/x86_test-vk.sh
.gitlab-ci/prepare-artifacts.sh

index 58a0c0e..20d1ad6 100644 (file)
@@ -420,7 +420,7 @@ x86_test-gl:
 x86_test-vk:
   extends: .use-x86_test-base
   variables:
-    MESA_IMAGE_TAG: &x86_test-vk "2021-05-19-piglit"
+    MESA_IMAGE_TAG: &x86_test-vk "2021-05-20-xorg"
 
 # Debian 11 based ARM build image
 arm_build:
diff --git a/.gitlab-ci/common/start-x.sh b/.gitlab-ci/common/start-x.sh
new file mode 100755 (executable)
index 0000000..f481be4
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -ex
+
+_XORG_SCRIPT="/xorg-script"
+_FLAG_FILE="/xorg-started"
+
+echo "touch ${_FLAG_FILE}; sleep 100000" > "${_XORG_SCRIPT}"
+if [ "x$1" != "x" ]; then
+    export LD_LIBRARY_PATH="${1}/lib"
+    export LIBGL_DRIVERS_PATH="${1}/lib/dri"
+fi
+xinit /bin/sh "${_XORG_SCRIPT}" -- /usr/bin/Xorg vt45 -noreset -dpms -logfile /Xorg.0.log &
+
+# Wait for xorg to be ready for connections.
+for i in 1 2 3 4 5; do
+    if [ -e "${_FLAG_FILE}" ]; then
+        break
+    fi
+    sleep 5
+done
index 7e40a61..c532b9f 100644 (file)
@@ -39,7 +39,10 @@ apt-get install -y --no-remove \
       $STABLE_EPHEMERAL \
       libxcb-shm0 \
       python3-lxml \
-      python3-simplejson
+      python3-simplejson \
+      xinit \
+      xserver-xorg-video-amdgpu \
+      xserver-xorg-video-ati
 
 # We need multiarch for Wine
 dpkg --add-architecture i386
index 4c61212..1067f24 100755 (executable)
@@ -26,6 +26,7 @@ fi
 # script and associated bits there.
 echo "$(cat VERSION) (git-$(git rev-parse HEAD | cut -b -10))" >> install/VERSION
 cp -Rp .gitlab-ci/bare-metal install/
+cp -Rp .gitlab-ci/common install/
 cp -Rp .gitlab-ci/piglit install/
 cp -Rp .gitlab-ci/fossils.yml install/
 cp -Rp .gitlab-ci/fossils install/