turnip: implement UBWC
[mesa.git] / .gitlab-ci / deqp-runner.sh
1 #!/bin/bash
2
3 set -ex
4
5 DEQP_OPTIONS=(--deqp-surface-width=256 --deqp-surface-height=256)
6 DEQP_OPTIONS+=(--deqp-surface-type=pbuffer)
7 DEQP_OPTIONS+=(--deqp-gl-config-name=rgba8888d24s8ms0)
8 DEQP_OPTIONS+=(--deqp-visibility=hidden)
9
10 # It would be nice to be able to enable the watchdog, so that hangs in a test
11 # don't need to wait the full hour for the run to time out. However, some
12 # shaders end up taking long enough to compile
13 # (dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 for example)
14 # that they'll sporadically trigger the watchdog.
15 #DEQP_OPTIONS+=(--deqp-watchdog=enable)
16
17 if [ -z "$DEQP_VER" ]; then
18 echo 'DEQP_VER must be set to something like "gles2" or "gles31" for the test run'
19 exit 1
20 fi
21
22 if [ -z "$DEQP_SKIPS" ]; then
23 echo 'DEQP_SKIPS must be set to something like "deqp-default-skips.txt"'
24 exit 1
25 fi
26
27 ARTIFACTS=`pwd`/artifacts
28
29 # Set up the driver environment.
30 export LD_LIBRARY_PATH=`pwd`/install/lib/
31 export EGL_PLATFORM=surfaceless
32
33 # the runner was failing to look for libkms in /usr/local/lib for some reason
34 # I never figured out.
35 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
36
37 RESULTS=`pwd`/results
38 mkdir -p $RESULTS
39
40 # Generate test case list file
41 cp /deqp/mustpass/$DEQP_VER-master.txt /tmp/case-list.txt
42
43 # If the job is parallel, take the corresponding fraction of the caselist.
44 # Note: N~M is a gnu sed extension to match every nth line (first line is #1).
45 if [ -n "$CI_NODE_INDEX" ]; then
46 sed -ni $CI_NODE_INDEX~$CI_NODE_TOTAL"p" /tmp/case-list.txt
47 fi
48
49 if [ ! -s /tmp/case-list.txt ]; then
50 echo "Caselist generation failed"
51 exit 1
52 fi
53
54 if [ -n "$DEQP_EXPECTED_FAILS" ]; then
55 XFAIL="--xfail-list $ARTIFACTS/$DEQP_EXPECTED_FAILS"
56 fi
57
58 set +e
59
60 vulkan-cts-runner \
61 --deqp /deqp/modules/$DEQP_VER/deqp-$DEQP_VER \
62 --output $RESULTS/cts-runner-results.txt \
63 --caselist /tmp/case-list.txt \
64 --exclude-list $ARTIFACTS/$DEQP_SKIPS \
65 $XFAIL \
66 --job ${DEQP_PARALLEL:-1} \
67 -- \
68 "${DEQP_OPTIONS[@]}"
69 DEQP_EXITCODE=$?
70
71 if [ $DEQP_EXITCODE -ne 0 ]; then
72 echo "Some unexpected results found (see cts-runner-results.txt in artifacts for full results):"
73 cat $RESULTS/cts-runner-results.txt | \
74 grep -v ",Pass" | \
75 grep -v ",Skip" | \
76 grep -v ",ExpectedFail" | \
77 head -n 50
78 exit $DEQP_EXITCODE
79 fi