intel/dump_gpu: only write BOs mapped by the driver
[mesa.git] / .gitlab-ci / tracie-runner-gl.sh
index 1c329c9cbe0ee1ed4f85e83904ca55ff3bd2ce65..246e79cef048273727db436f5718b58b84b135f5 100755 (executable)
@@ -17,13 +17,37 @@ export LD_LIBRARY_PATH="/waffle/build/lib:$LD_LIBRARY_PATH"
 # Set environment for apitrace executable.
 export PATH="/apitrace/build:$PATH"
 
+# Set environment for wflinfo executable.
+export PATH="/waffle/build/bin:$PATH"
+
 # Use the surfaceless EGL platform.
 export EGL_PLATFORM="surfaceless"
 export DISPLAY=
 export WAFFLE_PLATFORM="surfaceless_egl"
 
+# Our rootfs may not have "less", which apitrace uses during apitrace dump
+export PAGER=cat
+
+RESULTS=`pwd`/results
+mkdir -p $RESULTS
+
 # Perform a self-test to ensure tracie is working properly.
-"$INSTALL/tracie/tests/test.sh"
+if [ -z "$TRACIE_NO_UNIT_TESTS" ]; then
+    TRACIE_UPLOAD_TO_MINIO=0 python3 -m pytest -v --pyargs $INSTALL/tracie/tests/test.py
+fi
+
+if [ "$GALLIUM_DRIVER" = "virpipe" ]; then
+    # tracie is to use virpipe, and virgl_test_server llvmpipe
+    export GALLIUM_DRIVER="$GALLIUM_DRIVER"
+
+    GALLIUM_DRIVER=llvmpipe \
+    GALLIVM_PERF="nopt,no_filter_hacks" \
+    VTEST_USE_EGL_SURFACELESS=1 \
+    VTEST_USE_GLES=1 \
+    virgl_test_server >$RESULTS/vtest-log.txt 2>&1 &
+
+    sleep 1
+fi
 
 # Sanity check to ensure that our environment is sufficient to make our tests
 # run against the Mesa built by CI, rather than any installed distro version.