From 3f2449ec5fb4b536442e5c07711642257dc8db0a Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Fri, 23 Apr 2021 01:51:56 +0300 Subject: [PATCH] ci: add xorg to the x86_test-vk container 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 Reviewed-by: Martin Peres Part-of: --- .gitlab-ci.yml | 2 +- .gitlab-ci/common/start-x.sh | 21 +++++++++++++++++++++ .gitlab-ci/container/x86_test-vk.sh | 5 ++++- .gitlab-ci/prepare-artifacts.sh | 1 + 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100755 .gitlab-ci/common/start-x.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58a0c0ed14c..20d1ad62e86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 index 00000000000..f481be4c631 --- /dev/null +++ b/.gitlab-ci/common/start-x.sh @@ -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 diff --git a/.gitlab-ci/container/x86_test-vk.sh b/.gitlab-ci/container/x86_test-vk.sh index 7e40a6168a0..c532b9f8e2e 100644 --- a/.gitlab-ci/container/x86_test-vk.sh +++ b/.gitlab-ci/container/x86_test-vk.sh @@ -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 diff --git a/.gitlab-ci/prepare-artifacts.sh b/.gitlab-ci/prepare-artifacts.sh index 4c612127e7f..1067f24465b 100755 --- a/.gitlab-ci/prepare-artifacts.sh +++ b/.gitlab-ci/prepare-artifacts.sh @@ -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/