e389fc484e6eb74ca7f5f4432d1916abcc5d3e2d
[mesa.git] / src / gallium / drivers / panfrost / ci / deqp-runner.sh
1 #!/bin/sh
2
3 set -x
4
5 DEQP_OPTIONS="--deqp-surface-width=256 --deqp-surface-height=256"
6 DEQP_OPTIONS="$DEQP_OPTIONS --deqp-visibility=hidden"
7 DEQP_OPTIONS="$DEQP_OPTIONS --deqp-log-images=disable"
8 DEQP_OPTIONS="$DEQP_OPTIONS --deqp-watchdog=enable"
9 DEQP_OPTIONS="$DEQP_OPTIONS --deqp-crashhandler=enable"
10
11 export XDG_RUNTIME_DIR=/tmp
12 export LIBGL_DRIVERS_PATH=/mesa/lib/dri/
13 export LD_LIBRARY_PATH=/mesa/lib/
14 export XDG_CONFIG_HOME=$(pwd)
15 export MESA_GLES_VERSION_OVERRIDE=3.0
16
17 echo "[core]\nidle-time=0\nrequire-input=false\n[shell]\nlocking=false" > weston.ini
18
19 cd /deqp/modules/gles2
20
21 # Generate test case list file
22 weston --tty=7 &
23 sleep 1 # Give some time for Weston to start up
24 ./deqp-gles2 $DEQP_OPTIONS --deqp-runmode=stdout-caselist | grep "TEST: dEQP-GLES2" | cut -d ' ' -f 2 > /tmp/case-list.txt
25
26 # Disable for now tests that are very slow, either by just using lots of CPU or by crashing
27 sed -i '/dEQP-GLES2.performance/d' /tmp/case-list.txt
28 sed -i '/dEQP-GLES2.stress/d' /tmp/case-list.txt
29 sed -i '/dEQP-GLES2.functional.fbo.render.depth./d' /tmp/case-list.txt
30
31 # Cannot use tee because dash doesn't have pipefail
32 touch /tmp/result.txt
33 tail -f /tmp/result.txt &
34
35 while [ -s /tmp/case-list.txt ]; do
36 ./deqp-gles2 $DEQP_OPTIONS --deqp-log-filename=/dev/null --deqp-caselist-file=/tmp/case-list.txt >> /tmp/result.txt
37 if [ $? -ne 0 ]; then
38 # Continue from the subtest after the failing one
39 crashed_test=$(grep "Test case" /tmp/result.txt | tail -1 | sed "s/Test case '\(.*\)'\.\./\1/")
40 sed -i "0,/^$crashed_test$/d" /tmp/case-list.txt
41
42 # So LAVA knows what happened
43 echo "Test case '$crashed_test'..
44 Crash"
45 else
46 break
47 fi
48 done