39f42ffcc30a58a984fe183fb56e44ff8bb9df4f
[ffmpeg.git] / tests / fate-run.sh
1 #! /bin/sh
2
3 base=$(dirname $0)
4 . "${base}/md5.sh"
5
6 test="${1#fate-}"
7 SAMPLES_PATH=$2
8 target_exec=$3
9 BUILD_PATH=$4
10 command=$5
11 cmp=${6:-diff}
12
13 ref=${7:-"${base}/ref/fate/${test}"}
14 fuzz=$8
15 outdir="tests/data/fate"
16 outfile="${outdir}/${test}"
17
18 mkdir -p "$outdir"
19
20 eval $target_exec $command > "$outfile" 2>/dev/null
21
22 case $cmp in
23     diff)   diff -u -w "$ref" "$outfile"            ;;
24 esac