aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fate-run.sh
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-07-20 10:19:28 +0000
committerMåns Rullgård <mans@mansr.com>2010-07-20 10:19:28 +0000
commit9a3f31efcbad0d42c340e35d7d679c7c4d32c229 (patch)
tree1531e317e34febbaf24b45e05c4010b098efe8c7 /tests/fate-run.sh
parentb9d5f1b7eda75be3476c5e3cdb80ac1599e79561 (diff)
downloadffmpeg-9a3f31efcbad0d42c340e35d7d679c7c4d32c229.tar.gz
fate: allow running regtests through fate frontend
Originally committed as revision 24347 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-xtests/fate-run.sh42
1 files changed, 38 insertions, 4 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index 0bbb530918..4112e1a76c 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -59,15 +59,49 @@ pcm(){
ffmpeg "$@" -vn -f s16le -
}
-if ! test -e "$ref"; then
- echo "reference file '$ref' not found"
- exit 1
-fi
+regtest(){
+ t="${test#$2-}"
+ ref=${base}/ref/$2/$t
+ outfile=tests/data/regression/$2/$t
+ ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path"
+}
+
+codectest(){
+ regtest codec $1 tests/$1
+}
+
+lavftest(){
+ regtest lavf lavf tests/vsynth1
+}
+
+lavfitest(){
+ regtest lavfi lavfi tests/vsynth1
+}
+
+seektest(){
+ t="${test#seek-}"
+ ref=${base}/ref/seek/$t
+ case $t in
+ image_*) file="tests/data/images/${t#image_}/%02d.${t#image_}" ;;
+ *) file=$(echo $t | tr _ '?')
+ for d in acodec vsynth2 lavf; do
+ test -f tests/data/$d/$file && break
+ done
+ file=$(echo tests/data/$d/$file)
+ ;;
+ esac
+ $target_exec $target_path/tests/seek_test $target_path/$file
+}
mkdir -p "$outdir"
$command > "$outfile" 2>/dev/null || exit
+if ! test -e "$ref"; then
+ echo "reference file '$ref' not found"
+ exit 1
+fi
+
case $cmp in
diff) diff -u -w "$ref" "$outfile" ;;
oneoff) oneoff "$ref" "$outfile" "$fuzz" ;;