Statistics
| Branch: | Revision:

ffmpeg / tests / seek-regression.sh @ 73823cb9

History | View | Annotate | Download (856 Bytes)

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