2007-02-05 18:15:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-07-10 20:49:05 +00:00
|
|
|
LC_ALL=C
|
|
|
|
export LC_ALL
|
|
|
|
|
2010-03-02 21:59:16 +00:00
|
|
|
src_path=$1
|
2008-11-23 12:36:44 +00:00
|
|
|
target_exec=$2
|
|
|
|
target_path=$3
|
|
|
|
|
2010-03-02 21:59:27 +00:00
|
|
|
[ "${V-0}" -gt 0 ] && echov=echo || echov=:
|
|
|
|
[ "${V-0}" -gt 1 ] || exec 2>/dev/null
|
|
|
|
|
2010-03-02 21:59:16 +00:00
|
|
|
refdir="$src_path/tests/ref/seek"
|
2007-06-07 22:36:39 +00:00
|
|
|
datadir="tests/data"
|
2010-07-08 22:10:14 +00:00
|
|
|
logdir="$datadir/regression/seek"
|
|
|
|
|
|
|
|
mkdir -p "$logdir"
|
2007-02-05 18:15:03 +00:00
|
|
|
|
2010-03-07 19:26:02 +00:00
|
|
|
list=$(ls -1 $datadir/vsynth2/* $datadir/acodec/* $datadir/lavf/*)
|
2010-03-07 19:50:56 +00:00
|
|
|
imgs=$(for i in $datadir/images/*; do echo "$i/%02d.${i##*/}"; done)
|
2010-03-02 21:59:16 +00:00
|
|
|
err=0
|
2007-02-05 18:15:03 +00:00
|
|
|
|
2010-03-07 19:50:56 +00:00
|
|
|
for i in $list $imgs; do
|
2010-03-02 21:59:16 +00:00
|
|
|
base=$(basename $i)
|
2010-07-08 22:10:14 +00:00
|
|
|
logfile="$logdir/$base"
|
2010-03-02 21:59:16 +00:00
|
|
|
reffile="$refdir/$base.ref"
|
2010-03-02 21:59:27 +00:00
|
|
|
echo "TEST SEEK $base"
|
|
|
|
$echov $target_exec $target_path/tests/seek_test $target_path/$i
|
2010-03-02 21:59:16 +00:00
|
|
|
$target_exec $target_path/tests/seek_test $target_path/$i > $logfile
|
|
|
|
diff -u -w "$reffile" "$logfile" || err=1
|
2007-02-05 18:15:03 +00:00
|
|
|
done
|
|
|
|
|
2010-03-02 21:59:16 +00:00
|
|
|
if [ $err = 0 ]; then
|
2007-02-05 18:15:03 +00:00
|
|
|
echo
|
2008-01-29 23:30:00 +00:00
|
|
|
echo seek regression test: success
|
2007-02-05 18:15:03 +00:00
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo
|
2008-01-29 23:30:00 +00:00
|
|
|
echo seek regression test: error
|
2007-02-05 18:15:03 +00:00
|
|
|
exit 1
|
|
|
|
fi
|