diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-15 13:43:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-08-15 16:10:52 +0100 |
commit | 4d1517ed5f19ff738936691313ae5b09a2d4141e (patch) | |
tree | abe9c9d3ba7355c88f7de232844ca0f09db351ac /tests.d | |
parent | 0fae883b5850e6f6b311c0f4b940784a00dcbee9 (diff) |
tests: Add Unigine heaven and valley benchmarks
Diffstat (limited to 'tests.d')
-rw-r--r-- | tests.d/mesa/unigine-heaven.test | 34 | ||||
-rw-r--r-- | tests.d/mesa/unigine-valley.test | 34 |
2 files changed, 68 insertions, 0 deletions
diff --git a/tests.d/mesa/unigine-heaven.test b/tests.d/mesa/unigine-heaven.test new file mode 100644 index 0000000..8173c8e --- /dev/null +++ b/tests.d/mesa/unigine-heaven.test @@ -0,0 +1,34 @@ +# WARNING: Requires libframetime: https://github.com/clbr/libframetime + +test -e "$UNIGINE_HEAVEN_FOLDER/bin/heaven_x64" || return 1 +test -e "$LIBFRAMETIME64_SO" || return 1 + +unigine:heaven_run() { + cd "$UNIGINE_HEAVEN_FOLDER" # Set this variable in test_options.sh + + for (( c=0; c<$1; 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 +} + +unigine:heaven:cpu_run() { INTEL_NO_HW=1 unigine:heaven_run $@; } + +test_name="unigine:heaven unigine:heaven:cpu" +test_exec_time=300 diff --git a/tests.d/mesa/unigine-valley.test b/tests.d/mesa/unigine-valley.test new file mode 100644 index 0000000..a56b3c2 --- /dev/null +++ b/tests.d/mesa/unigine-valley.test @@ -0,0 +1,34 @@ +# WARNING: Requires libframetime: https://github.com/clbr/libframetime + +test -e "$UNIGINE_VALLEY_FOLDER/bin/valley_x64" || return 1 +test -e "$LIBFRAMETIME64_SO" || return 1 + +unigine:valley_run() { + cd "$UNIGINE_VALLEY_FOLDER" # Set this variable in test_options.sh + + for (( c=0; c<$1; 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/valley_x64 \ + -video_app opengl \ + -data_path ../ \ + -sound_app null \ + -engine_config ../data/valley_1.0.cfg \ + -system_script valley/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 +} + +unigine:valley:cpu_run() { INTEL_NO_HW=1 unigine:valley_run $@; } + +test_name="unigine:valley unigine:valley:cpu" +test_exec_time=190 |