summaryrefslogtreecommitdiff
path: root/.gitlab-ci/tracie-runner.sh
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci/tracie-runner.sh')
-rwxr-xr-x.gitlab-ci/tracie-runner.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/.gitlab-ci/tracie-runner.sh b/.gitlab-ci/tracie-runner.sh
new file mode 100755
index 00000000000..7b5db08e105
--- /dev/null
+++ b/.gitlab-ci/tracie-runner.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -ex
+
+ARTIFACTS="$(pwd)/artifacts"
+
+# Set up the driver environment.
+export LD_LIBRARY_PATH="$(pwd)/install/lib/"
+
+# Set environment for renderdoc libraries.
+export PYTHONPATH="$PYTHONPATH:/renderdoc/build/lib"
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/renderdoc/build/lib"
+
+# Perform a self-test to ensure tracie is working properly.
+"$ARTIFACTS/tracie/tests/test.sh"
+
+ret=0
+
+# The renderdoc version we use can handle surfaceless.
+EGL_PLATFORM=surfaceless DISPLAY= \
+ "$ARTIFACTS/tracie/tracie.sh" "$ARTIFACTS/traces.yml" renderdoc \
+ || ret=1
+
+# We need a newer waffle to use surfaceless with apitrace. For now run with
+# xvfb.
+xvfb-run --server-args="-noreset" sh -c \
+ "set -ex; \
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH; \
+ export PATH=/apitrace/build:\$PATH; \
+ \"$ARTIFACTS/tracie/tracie.sh\" \"$ARTIFACTS/traces.yml\" apitrace" \
+ || ret=1
+
+exit $ret