summaryrefslogtreecommitdiff
path: root/tests.d/mesa/xonotic.test
blob: 9f543d02ef8e377b7cc59c15362f24835a42df1d (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
test -e "$XONOTIC_FOLDER/xonotic-glx" || return 1

__xonotic__() {
    fullscreen=$1
    width=$2
    height=$3

    # 10510 frames 24.7782191 seconds 424.1628480 fps, one-second fps min/avg/max: 57 1352 7027 (336 seconds)
    local extract_fps="egrep -e '[0-9]+ frames' | cut -d ' ' -f 5 2> /dev/null"

    run_bench 0 $XONOTIC_FOLDER/xonotic-glx +vid_width $width +vid_height $height \
                +vid_fullscreen $fullscreen +exec effects-high.cfg                \
                -benchmark demos/the-big-keybench | eval $extract_fps
}

while read name width height; do
   name="xonotic:${name}"

   eval "$name:fullscreen_run() { __xonotic__ 1 $width $height; }"
   test_name="$test_name $name:fullscreen"

   eval "$name:window_run() { __xonotic__ 0 $width $height; }"
   test_name="$test_name $name:window"
done<<EOL
        720p 1280 720
        1080p 1920 1080
EOL

eval "xonotic:cpu_run() { INTEL_NO_HW=1 __xonotic__ 0 $width $height; }"
test_name="$test_name xonotic:cpu"

test_exec_time=80