diff --git a/.gitlab-ci/common/init.sh b/.gitlab-ci/common/init.sh index ef8499c83ac..c9938ed91cc 100755 --- a/.gitlab-ci/common/init.sh +++ b/.gitlab-ci/common/init.sh @@ -24,10 +24,15 @@ for i in 1 2 3; do sntp -sS pool.ntp.org && break || sleep 2; done || true # Fix prefix confusion: the build installs to $CI_PROJECT_DIR, but we expect # it in /install ln -sf $CI_PROJECT_DIR/install /install +export LD_LIBRARY_PATH=/install/lib +export LIBGL_DRIVERS_PATH=/install/lib/dri # Store Mesa's disk cache under /tmp, rather than sending it out over NFS. export XDG_CACHE_HOME=/tmp +# Make sure Python can find all our imports +export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))") + # Start a little daemon to capture the first devcoredump we encounter. (They # expire after 5 minutes, so we poll for them). ./capture-devcoredump.sh & @@ -39,8 +44,6 @@ export XDG_CACHE_HOME=/tmp if [ -n "$BM_START_XORG" ]; then echo "touch /xorg-started; sleep 100000" > /xorg-script env \ - LD_LIBRARY_PATH=/install/lib/ \ - LIBGL_DRIVERS_PATH=/install/lib/dri/ \ xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log & # Wait for xorg to be ready for connections. diff --git a/.gitlab-ci/lava/lava.yml.jinja2 b/.gitlab-ci/lava/lava.yml.jinja2 index 6d8df7379b2..66a82a8cb8b 100644 --- a/.gitlab-ci/lava/lava.yml.jinja2 +++ b/.gitlab-ci/lava/lava.yml.jinja2 @@ -107,6 +107,7 @@ actions: - export XDG_CACHE_HOME=/tmp - export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))") + - export LD_LIBRARY_PATH=/install/lib/ - export LIBGL_DRIVERS_PATH=/install/lib/dri # If we want Xorg to be running for the test, then we start it up before the @@ -115,7 +116,7 @@ actions: # your client's return code - "if [ -n $LAVA_START_XORG ]; then echo 'touch /xorg-started; sleep 100000' > /xorg-script; - env LD_LIBRARY_PATH=/install/lib/ xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log & + env xinit /bin/sh /xorg-script -- /usr/bin/Xorg -noreset -s 0 -dpms -logfile /Xorg.0.log & for i in 1 2 3 4 5; do if [ -e /xorg-started ]; then break;