X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=tests%2Ffate-run.sh;h=c68c389826a0d91aebdfd8347cbbaed6fc085429;hb=8297d87eecbf19821a8f6f1e230f025394f281d2;hp=fec3c5e152f97517da87e63b159ba849ab2ec509;hpb=5b97681eaa5aed5103519deed4a706b89a910746;p=ffmpeg diff --git a/tests/fate-run.sh b/tests/fate-run.sh index fec3c5e152f..c68c389826a 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -220,6 +220,28 @@ pixfmts(){ test=$outertest } +gapless(){ + sample=$(target_path $1) + extra_args=$2 + + decfile1="${outdir}/${test}.out-1" + decfile2="${outdir}/${test}.out-2" + cleanfiles="$cleanfiles $decfile1 $decfile2" + + # large enough to make ffmpeg.c seek to the start of the file + start_offset=-1 + + # test packet data + ffmpeg -i "$sample" $extra_args -flags +bitexact -c:a copy -f framecrc -y $decfile1 + do_md5sum $decfile1 + # test decoded (and cut) data + ffmpeg -i "$sample" $extra_args -flags +bitexact -f wav md5: + # the same as aboce again, with seeking to the start + ffmpeg -ss $start_offset -i "$sample" $extra_args -flags +bitexact -c:a copy -f framecrc -y $decfile2 + do_md5sum $decfile2 + ffmpeg -ss $start_offset -i "$sample" $extra_args -flags +bitexact -f wav md5: +} + mkdir -p "$outdir" # Disable globbing: command arguments may contain globbing characters and @@ -252,7 +274,13 @@ else err=1 fi -echo "${test}:${sig:-$err}:$($base64 <$cmpfile):$($base64 <$errfile)" >$repfile +if [ $err -eq 0 ]; then + unset cmpo erro +else + cmpo="$($base64 <$cmpfile)" + erro="$($base64 <$errfile)" +fi +echo "${test}:${sig:-$err}:$cmpo:$erro" >$repfile if test $err != 0 && test $gen != "no" ; then echo "GEN $ref"