]> git.sesse.net Git - ffmpeg/blob - tests/copycooker.sh
Merge commit 'dc40e64adb1712b1209c018914a44f809bc32664'
[ffmpeg] / tests / copycooker.sh
1 #!/bin/sh
2
3 LC_ALL=C
4 export LC_ALL
5
6 datadir="tests/data"
7
8 logfile="$datadir/copy.regression"
9 reffile="$1"
10
11 list=$(grep -oh ' ./tests/data/.*' tests/ref/{acodec,lavf,vsynth1}/*| sort)
12 rm -f $logfile
13 for i in $list ; do
14     echo ---------------- >> $logfile
15     echo $i >> $logfile
16     ./ffmpeg_g -flags +bitexact -i $i -acodec copy -vcodec copy -y first.nut
17     ./ffmpeg_g -flags +bitexact -i first.nut -acodec copy -vcodec copy -y second.nut
18     cmp first.nut second.nut >> $logfile
19     md5sum first.nut >> $logfile
20 done
21
22 if diff -u -w "$reffile" "$logfile" ; then
23     echo
24     echo copy regression test: success
25     exit 0
26 else
27     echo
28     echo copy regression test: error
29     exit 1
30 fi