blob: 974e31d667ae43f458efae4c12c4cf7b9b718986 (
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
34
35
36
|
# WARNING: Requires libframetime: https://github.com/clbr/libframetime
test -e "$UNIGINE_HEAVEN_FOLDER/bin/heaven_x64" || return 1
test -e "$LIBFRAMETIME64_SO" || return 1
# 3 arguments: $rounds $fps_logs_file $runID
unigine:heaven_run() {
cd "$UNIGINE_HEAVEN_FOLDER" # Set this variable in test_options.sh
for (( c=$3; c<$1+$3; c++ )); do
rm -f /tmp/frametime.log
LIBFRAMETIME_FILE=/tmp/frametime.log LD_PRELOAD=$LIBFRAMETIME64_SO \
LD_LIBRARY_PATH=bin:bin/x64:$LD_LIBRARY_PATH \
vblank_mode=0 taskset 1 \
./bin/heaven_x64 \
-video_app opengl \
-data_path ../ \
-sound_app null \
-engine_config ../data/heaven_4.0.cfg \
-system_script heaven/unigine.cpp \
-extern_define PHORONIX,RELEASE \
-video_mode -1 \
-video_fullscreen 1 >/dev/null
# read back the result, skip the first frames since they are the loading frames
cat /tmp/frametime.log | awk '{if (++n > 100) {print 1000000/$2}}' > $2#$c
awk '{sum=sum+$1} END {print sum/NR}' $2#$c
done
}
# 3 arguments: $rounds $fps_logs_file $runID
unigine:heaven:cpu_run() { INTEL_NO_HW=1 unigine:heaven_run $@; }
test_name="unigine:heaven unigine:heaven:cpu"
test_exec_time=300
|