aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/tracie-runner-gl.sh
blob: 7b5db08e105d7e3692a0ec6584ab88f553d81aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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