seek-regression.sh 524 Bytes
Newer Older
Michael Niedermayer's avatar
Michael Niedermayer committed
1 2
#!/bin/sh

Måns Rullgård's avatar
Måns Rullgård committed
3 4 5
LC_ALL=C
export LC_ALL

6 7 8
target_exec=$2
target_path=$3

9
datadir="tests/data"
Michael Niedermayer's avatar
Michael Niedermayer committed
10 11 12 13

logfile="$datadir/seek.regression"
reffile="$1"

14
list=`grep '^tests/data/[ab]-' "$reffile"`
15
rm -f $logfile
Michael Niedermayer's avatar
Michael Niedermayer committed
16
for i in $list ; do
Diego Biurrun's avatar
Diego Biurrun committed
17 18
    echo ---------------- >> $logfile
    echo $i >> $logfile
19
    $target_exec $target_path/tests/seek_test $target_path/$i >> $logfile
Michael Niedermayer's avatar
Michael Niedermayer committed
20 21
done

22
if diff -u -w "$reffile" "$logfile" ; then
Michael Niedermayer's avatar
Michael Niedermayer committed
23
    echo
24
    echo seek regression test: success
Michael Niedermayer's avatar
Michael Niedermayer committed
25 26 27
    exit 0
else
    echo
28
    echo seek regression test: error
Michael Niedermayer's avatar
Michael Niedermayer committed
29 30
    exit 1
fi