Mesa (master): ci/lava: Start Xorg on request, for Piglit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 20 07:48:10 UTC 2021


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

Author: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Date:   Fri Apr  9 11:55:34 2021 +0200

ci/lava: Start Xorg on request, for Piglit

We will need this for running Piglit jobs.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Acked-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10139>

---

 .gitlab-ci/lava.yml.jinja2 | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/.gitlab-ci/lava.yml.jinja2 b/.gitlab-ci/lava.yml.jinja2
index 57e2ab94ba6..e112a847bc1 100644
--- a/.gitlab-ci/lava.yml.jinja2
+++ b/.gitlab-ci/lava.yml.jinja2
@@ -112,7 +112,23 @@ actions:
           - export PIGLIT_REPLAY_DEVICE_NAME=gl-{{ gpu_version }}
           - export PIGLIT_RESULTS={{ gpu_version }}-${PIGLIT_PROFILES}
 
-          - export LIBGL_DRIVERS_PATH=`pwd`/install/lib/dri
+          - export LIBGL_DRIVERS_PATH=/install/lib/dri
+
+          # If we want Xorg to be running for the test, then we start it up before the
+          # LAVA_TEST_SCRIPT because we need to use xinit to start X (otherwise
+          # without using -displayfd you can race with Xorg's startup), but xinit will eat
+          # 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 -dpms -logfile /Xorg.0.log &
+               for i in 1 2 3 4 5; do
+                 if [ -e /xorg-started ]; then
+                   break;
+                 fi;
+                 sleep 5;
+               done;
+               export DISPLAY=:0;
+             fi"
 
           - "if sh $LAVA_TEST_SCRIPT; then
                   export RESULT=pass;



More information about the mesa-commit mailing list