regtest: run seektest on lavftest output files
[libav.git] / tests / seek-regression.sh
CommitLineData
f97b7e66 1#!/bin/sh
f97b7e66 2
1e56c151
MR
3LC_ALL=C
4export LC_ALL
5
d7096d6f 6src_path=$1
9a5771e9
MR
7target_exec=$2
8target_path=$3
9
1233698b
MR
10[ "${V-0}" -gt 0 ] && echov=echo || echov=:
11[ "${V-0}" -gt 1 ] || exec 2>/dev/null
12
d7096d6f 13refdir="$src_path/tests/ref/seek"
4fbd52f0 14datadir="tests/data"
f97b7e66 15
d1be9635 16list=$(ls -1 $datadir/vsynth2/* $datadir/acodec/* $datadir/lavf/*)
d7096d6f 17err=0
f97b7e66 18
f97b7e66 19for i in $list ; do
d7096d6f
MR
20 base=$(basename $i)
21 logfile="$datadir/$base.seek.regression"
22 reffile="$refdir/$base.ref"
1233698b
MR
23 echo "TEST SEEK $base"
24 $echov $target_exec $target_path/tests/seek_test $target_path/$i
d7096d6f
MR
25 $target_exec $target_path/tests/seek_test $target_path/$i > $logfile
26 diff -u -w "$reffile" "$logfile" || err=1
f97b7e66
MN
27done
28
d7096d6f 29if [ $err = 0 ]; then
f97b7e66 30 echo
76de4ea6 31 echo seek regression test: success
f97b7e66
MN
32 exit 0
33else
34 echo
76de4ea6 35 echo seek regression test: error
f97b7e66
MN
36 exit 1
37fi