Added ability to compare results with an old js8 decoder for testing
This commit is contained in:
parent
d4eb7497d5
commit
bef896c771
@ -3,7 +3,7 @@
|
|||||||
# Run test cases using the media files and the js8 cli decoder
|
# Run test cases using the media files and the js8 cli decoder
|
||||||
|
|
||||||
JS8=~/js8call-prefix/build/js8
|
JS8=~/js8call-prefix/build/js8
|
||||||
#JS8=/opt/js8call/bin/js8
|
#JS8_ALT=/opt/js8call/bin/js8
|
||||||
|
|
||||||
PWD=$(pwd)
|
PWD=$(pwd)
|
||||||
|
|
||||||
@ -12,27 +12,28 @@ declare -i fail=0
|
|||||||
|
|
||||||
for f in *.wav
|
for f in *.wav
|
||||||
do
|
do
|
||||||
|
|
||||||
MODE=$(echo $f | cut -f 1 -d '_')
|
MODE=$(echo $f | cut -f 1 -d '_')
|
||||||
DEPTH=$(echo $f | cut -f 2 -d '_')
|
DEPTH=$(echo $f | cut -f 2 -d '_')
|
||||||
EXPECTED=$(echo $f | cut -f 3 -d '_' | cut -f 1 -d '.')
|
EXPECTED=$(echo $f | cut -f 3 -d '_' | cut -f 1 -d '.')
|
||||||
|
|
||||||
OUT=$($JS8 -8 -b $MODE -d $DEPTH $PWD/$f | tail -n 1 | awk '{print $(NF)}' | sed -E 's/\s//g')
|
OUT=$($JS8 -8 -b $MODE -d $DEPTH $PWD/$f | tail -n 1 | awk '{print $(NF)}' | sed -E 's/\s//g')
|
||||||
|
|
||||||
|
if [ "$JS8_ALT" != "" ]; then
|
||||||
|
OUT_ALT=$($JS8_ALT -8 -b $MODE -d $DEPTH $PWD/$f | tail -n 1 | awk '{print $(NF)}' | sed -E 's/\s//g')
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n $f...
|
echo -n $f...
|
||||||
|
|
||||||
if [ "$OUT" == "$EXPECTED" ]; then
|
if [ "$OUT" == "$EXPECTED" ]; then
|
||||||
|
|
||||||
echo PASS.
|
echo PASS.
|
||||||
|
|
||||||
pass=$((pass+1))
|
pass=$((pass+1))
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo FAIL got $OUT expected $EXPECTED;
|
echo FAIL got $OUT expected $EXPECTED;
|
||||||
|
|
||||||
fail=$((fail+1))
|
fail=$((fail+1))
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$JS8_ALT" != "" ]; then
|
||||||
|
echo "--> js8 alt got $OUT_ALT expected $EXPECTED"
|
||||||
|
echo
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user