From 90b6f84c5eace12f8facd7e4ea0170f86426cb97 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 27 Sep 2023 13:37:25 +0100 Subject: [PATCH] ci: when specifying a driver remove all other ones If we need to specify a driver, it means several drivers could pick up this gpu; ensure that the other driver can't accidentally be used. Part-of: --- .gitlab-ci/common/init-stage2.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci/common/init-stage2.sh b/.gitlab-ci/common/init-stage2.sh index 7440893a667..0baf7aebe54 100755 --- a/.gitlab-ci/common/init-stage2.sh +++ b/.gitlab-ci/common/init-stage2.sh @@ -7,6 +7,8 @@ # Second-stage init, used to set up devices and our job environment before # running tests. +shopt -s extglob + # Make sure to kill itself and all the children process from this script on # exiting, since any console output may interfere with LAVA signals handling, # which based on the log console. @@ -106,6 +108,13 @@ export XDG_CACHE_HOME=/tmp # Make sure Python can find all our imports export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))") +# If we need to specify a driver, it means several drivers could pick up this gpu; +# ensure that the other driver can't accidentally be used +if [ -n "$MESA_LOADER_DRIVER_OVERRIDE" ]; then + rm /install/lib/dri/!($MESA_LOADER_DRIVER_OVERRIDE)_dri.so +fi +ls -l /install/lib/dri/*_dri.so + if [ "$HWCI_FREQ_MAX" = "true" ]; then # Ensure initialization of the DRM device (needed by MSM) head -0 /dev/dri/renderD128