remove old rendertest.sh
This commit is contained in:
parent
2b19a8d196
commit
bcd3e91e68
@ -1,73 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Exec this script from the directory with xash3d executable
|
|
||||||
|
|
||||||
TEST_ROOT="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
||||||
WORKDIR="$TEST_ROOT/work"
|
|
||||||
IMAGE_COMPARE="$TEST_ROOT/imagecompare"
|
|
||||||
|
|
||||||
compile() {
|
|
||||||
pushd "$TEST_ROOT"
|
|
||||||
make
|
|
||||||
./rendertest.py -s rendertest.script
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
prepare() {
|
|
||||||
mkdir -p "$WORKDIR"
|
|
||||||
|
|
||||||
cp -av "$TEST_ROOT/maps" "valve/"
|
|
||||||
cp -av "$TEST_ROOT/save" "valve/"
|
|
||||||
cp -av "$TEST_ROOT/rendertest.script" "./"
|
|
||||||
}
|
|
||||||
|
|
||||||
generate() {
|
|
||||||
time RADV_PERFTEST=rt LD_LIBRARY_PATH=. \
|
|
||||||
./xash3d -ref vk -nowriteconfig -nosound \
|
|
||||||
-width 1280 -height 800 \
|
|
||||||
+exec "rendertest.script"
|
|
||||||
# valve/rendertest now contains lots of images
|
|
||||||
}
|
|
||||||
|
|
||||||
compare() {
|
|
||||||
for i in $TEST_ROOT/gold/*.png
|
|
||||||
do
|
|
||||||
BASE="$(basename "$i" .png)"
|
|
||||||
|
|
||||||
"$IMAGE_COMPARE" \
|
|
||||||
"$i" \
|
|
||||||
"valve/rendertest/$BASE.tga" \
|
|
||||||
"$WORKDIR/${BASE}_diff.tga" \
|
|
||||||
|| echo "FAILED: $BASE"
|
|
||||||
|
|
||||||
convert \
|
|
||||||
\( "$i" -bordercolor gold -border 2x2 \
|
|
||||||
-gravity SouthWest -font Impact -pointsize 24 -fill gold -stroke black -annotate 0 'GOLD' \) \
|
|
||||||
\( "valve/rendertest/$BASE.tga" -bordercolor white -border 2x2 \
|
|
||||||
-fill white -annotate 0 'TEST' \) \
|
|
||||||
-loop 0 -set delay 25 "$WORKDIR/${BASE}_flip.gif"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
convert_png() {
|
|
||||||
pushd "valve/rendertest"
|
|
||||||
|
|
||||||
for i in *tga
|
|
||||||
do
|
|
||||||
BASE="$(basename "$i" .tga)"
|
|
||||||
convert "$i" "$BASE".png
|
|
||||||
done
|
|
||||||
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
run() {
|
|
||||||
time compile
|
|
||||||
prepare
|
|
||||||
time generate
|
|
||||||
time compare
|
|
||||||
}
|
|
||||||
|
|
||||||
time "$@"
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user