mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-12-01 16:42:13 +00:00
4597b03873
Opens in Android Studio but haven't even tried to build it yet (it won't.. I know that much!)
35 lines
774 B
Bash
35 lines
774 B
Bash
#!/bin/bash
|
|
#
|
|
# WARNING: do not execute this file unless you are aware of what you're doing.
|
|
# This file is meant to be executed by ctest.
|
|
|
|
export LIBGL_FB=3
|
|
export LIBGL_SILENTSTUB=1
|
|
export LIBGL_NOBANNER=1
|
|
|
|
tar xf ../traces/$1.tgz
|
|
apitrace dump-images --calls="$2" $1.trace >/dev/null
|
|
rm $1.trace
|
|
|
|
if [[ -f $1.$2.png ]]
|
|
then
|
|
mv $1.$2.png $1.$2.$LIBGL_ES.png
|
|
|
|
EXTRACT=""
|
|
if [[ ! -z "$4" ]]
|
|
then
|
|
EXTRACT="-extract $4"
|
|
fi
|
|
result=$(compare -metric AE -fuzz 20% $EXTRACT ../refs/$1.$2.png $1.$2.$LIBGL_ES.png diff_$1_GLES$LIBGL_ES.png 2>&1)
|
|
|
|
if [[ ! "$result" -lt "$3" ]]
|
|
then
|
|
echo -n "$result pixels of difference"
|
|
exit 1
|
|
fi
|
|
|
|
[[ -e diff_$1_GLES$LIBGL_ES.png ]] && rm diff_$1_GLES$LIBGL_ES.png
|
|
[[ -e $1.$2.$LIBGL_ES.png ]] && rm $1.$2.$LIBGL_ES.png
|
|
fi
|
|
|
|
exit 0
|