summaryrefslogtreecommitdiff
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2012-04-17 16:47:57 +0100
committerJustin Ruggles <justin.ruggles@gmail.com>2012-04-18 22:26:56 -0400
commit9cc338b1de78c1b82d0867ea96e07367038d226e (patch)
treef970d2de3a97812fe4a2ae54649d362af1e935e7 /tests/fate-run.sh
parentc755b1fbbc54694f1ac657be7517de28981cf326 (diff)
FATE: pass the decoded output format and audio source file to enc_dec_pcm
This will allow decoding to md5 and doing a diff comparison to a reference checksum instead of a fuzzy stddev or oneoff comparison. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 39db0e89e0..f7a7abaa76 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -28,6 +28,11 @@ errfile="${outdir}/${test}.err"
cmpfile="${outdir}/${test}.diff"
repfile="${outdir}/${test}.rep"
+target_path(){
+ test ${1} = ${1#/} && p=${target_path}/
+ echo ${p}${1}
+}
+
# $1=value1, $2=value2, $3=threshold
# prints 0 if absolute difference between value1 and value2 is <= threshold
compare(){
@@ -86,12 +91,15 @@ pcm(){
enc_dec_pcm(){
out_fmt=$1
- pcm_fmt=$2
- shift 2
+ dec_fmt=$2
+ pcm_fmt=$3
+ src_file=$(target_path $4)
+ shift 4
encfile="${outdir}/${test}.${out_fmt}"
cleanfiles=$encfile
- avconv -i $ref "$@" -f $out_fmt -y ${target_path}/${encfile} || return
- avconv -f $out_fmt -i ${target_path}/${encfile} -c:a pcm_${pcm_fmt} -f wav -
+ encfile=$(target_path ${encfile})
+ avconv -i $src_file "$@" -f $out_fmt -y ${encfile} || return
+ avconv -f $out_fmt -i ${encfile} -c:a pcm_${pcm_fmt} -f ${dec_fmt} -
}
regtest(){