aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-03-10 19:52:05 -0500
committerJustin Ruggles <justin.ruggles@gmail.com>2012-03-15 14:40:31 -0400
commitcffd7580bbdf29ae5b1e56af55ff21e8c85bba6c (patch)
tree8bc8088ecb45c516c468c5350006e63893251ff3 /tests/fate-run.sh
parentbb6842966e8b2c942a1853ade3d9bc7817dfc2ee (diff)
downloadffmpeg-cffd7580bbdf29ae5b1e56af55ff21e8c85bba6c.tar.gz
FATE: allow a tolerance in the size comparison in do_tiny_psnr()
This will allow for comparing decoded output to the original source when the decoded size is not exactly the same as the original size.
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 07065c3f30..40a4fe2f6d 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -20,6 +20,7 @@ thread_type=${10:-frame+slice}
cpuflags=${11:-all}
cmp_shift=${12:-0}
cmp_target=${13:-0}
+size_tolerance=${14:-0}
outdir="tests/data/fate"
outfile="${outdir}/${test}"
@@ -40,7 +41,8 @@ do_tiny_psnr(){
size1=$(expr "$psnr" : '.*bytes: *\([0-9]*\)')
size2=$(expr "$psnr" : '.*bytes:[ 0-9]*/ *\([0-9]*\)')
val_cmp=$(compare $val $cmp_target $fuzz)
- if [ "$val_cmp" != 0 ] || [ $size1 != $size2 ]; then
+ size_cmp=$(compare $size1 $size2 $size_tolerance)
+ if [ "$val_cmp" != 0 ] || [ "$size_cmp" != 0 ]; then
echo "$psnr"
return 1
fi