Statistics
| Branch: | Revision:

ffmpeg / tests / seek-regression.sh @ d1be9635

History | View | Annotate | Download (782 Bytes)

1
#!/bin/sh
2

    
3
LC_ALL=C
4
export LC_ALL
5

    
6
src_path=$1
7
target_exec=$2
8
target_path=$3
9

    
10
[ "${V-0}" -gt 0 ] && echov=echo || echov=:
11
[ "${V-0}" -gt 1 ] || exec 2>/dev/null
12

    
13
refdir="$src_path/tests/ref/seek"
14
datadir="tests/data"
15

    
16
list=$(ls -1 $datadir/vsynth2/* $datadir/acodec/* $datadir/lavf/*)
17
err=0
18

    
19
for i in $list ; do
20
    base=$(basename $i)
21
    logfile="$datadir/$base.seek.regression"
22
    reffile="$refdir/$base.ref"
23
    echo "TEST SEEK   $base"
24
    $echov $target_exec $target_path/tests/seek_test $target_path/$i
25
    $target_exec $target_path/tests/seek_test $target_path/$i > $logfile
26
    diff -u -w "$reffile" "$logfile" || err=1
27
done
28

    
29
if [ $err = 0 ]; then
30
    echo
31
    echo seek regression test: success
32
    exit 0
33
else
34
    echo
35
    echo seek regression test: error
36
    exit 1
37
fi