Commit 3d147064 authored by Diego Biurrun's avatar Diego Biurrun

Replace ` ` syntax by $( ) in regression test shell scripts.

The latter syntax variant is more readable and easier to nest.

Originally committed as revision 20924 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent b03a63d1
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf #perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf
#perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_.asf>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf #perl -e 'chomp($wd = `pwd`); print map { s!tests/data/!!; "<Stream $_.asf>\nFile $wd/tests/data/$_\n</Stream>\n\n" } @ARGV' tests/data/a* >> tests/data/ffserver.conf
FILES=`sed -n 's/^[^#]*<Stream \(.*\)>.*/\1/p' $2 | grep -v html` FILES=$(sed -n 's/^[^#]*<Stream \(.*\)>.*/\1/p' $2 | grep -v html)
rm -f tests/feed1.ffm rm -f tests/feed1.ffm
./ffserver -d -f "$2" 2> /dev/null & ./ffserver -d -f "$2" 2> /dev/null &
...@@ -15,7 +15,7 @@ sleep 2 ...@@ -15,7 +15,7 @@ sleep 2
rm -f ff-*; rm -f ff-*;
WGET_OPTIONS="--user-agent=NSPlayer -q --proxy=off -e verbose=off -e server_response=off" WGET_OPTIONS="--user-agent=NSPlayer -q --proxy=off -e verbose=off -e server_response=off"
for file in $FILES; do for file in $FILES; do
if [ `expr $file : "a-*"` != 0 ]; then if [ $(expr $file : "a-*") != 0 ]; then
wget $WGET_OPTIONS -O - http://localhost:9999/$file > ff-$file wget $WGET_OPTIONS -O - http://localhost:9999/$file > ff-$file
else else
wget $WGET_OPTIONS -O - http://localhost:9999/$file?date=19700101T000000Z | dd bs=1 count=20000 > ff-$file 2>/dev/null wget $WGET_OPTIONS -O - http://localhost:9999/$file?date=19700101T000000Z | dd bs=1 count=20000 > ff-$file 2>/dev/null
......
...@@ -33,9 +33,9 @@ pcm_ref="$datadir/$test_ref.ref.wav" ...@@ -33,9 +33,9 @@ pcm_ref="$datadir/$test_ref.ref.wav"
crcfile="$datadir/$this.crc" crcfile="$datadir/$this.crc"
target_crcfile="$target_datadir/$this.crc" target_crcfile="$target_datadir/$this.crc"
if [ X"`echo | md5sum 2> /dev/null`" != X ]; then if [ X"$(echo | md5sum 2> /dev/null)" != X ]; then
do_md5sum() { md5sum -b $1; } do_md5sum() { md5sum -b $1; }
elif [ X"`echo | md5 2> /dev/null`" != X ]; then elif [ X"$(echo | md5 2> /dev/null)" != X ]; then
do_md5sum() { md5 $1 | sed 's#MD5 (\(.*\)) = \(.*\)#\2 *\1#'; } do_md5sum() { md5 $1 | sed 's#MD5 (\(.*\)) = \(.*\)#\2 *\1#'; }
elif [ -x /sbin/md5 ]; then elif [ -x /sbin/md5 ]; then
do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; } do_md5sum() { /sbin/md5 -r $1 | sed 's# \**\./# *./#'; }
...@@ -60,8 +60,8 @@ do_ffmpeg() ...@@ -60,8 +60,8 @@ do_ffmpeg()
else else
wc -c $f >> $logfile wc -c $f >> $logfile
fi fi
expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2 expr "$(cat $bench)" : '.*utime=\(.*s\)' > $bench2
echo `cat $bench2` $f >> $benchfile echo $(cat $bench2) $f >> $benchfile
} }
do_ffmpeg_nomd5() do_ffmpeg_nomd5()
...@@ -78,8 +78,8 @@ do_ffmpeg_nomd5() ...@@ -78,8 +78,8 @@ do_ffmpeg_nomd5()
else else
wc -c $f >> $logfile wc -c $f >> $logfile
fi fi
expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2 expr "$(cat $bench)" : '.*utime=\(.*s\)' > $bench2
echo `cat $bench2` $f >> $benchfile echo $(cat $bench2) $f >> $benchfile
} }
do_ffmpeg_crc() do_ffmpeg_crc()
...@@ -88,7 +88,7 @@ do_ffmpeg_crc() ...@@ -88,7 +88,7 @@ do_ffmpeg_crc()
shift shift
echo $ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile" echo $ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile"
$ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile" $ffmpeg $FFMPEG_OPTS $* -f crc "$target_crcfile"
echo "$f `cat $crcfile`" >> $logfile echo "$f $(cat $crcfile)" >> $logfile
rm -f "$crcfile" rm -f "$crcfile"
} }
...@@ -98,8 +98,8 @@ do_ffmpeg_nocheck() ...@@ -98,8 +98,8 @@ do_ffmpeg_nocheck()
shift shift
echo $ffmpeg $FFMPEG_OPTS $* echo $ffmpeg $FFMPEG_OPTS $*
$ffmpeg $FFMPEG_OPTS -benchmark $* > $bench $ffmpeg $FFMPEG_OPTS -benchmark $* > $bench
expr "`cat $bench`" : '.*utime=\(.*s\)' > $bench2 expr "$(cat $bench)" : '.*utime=\(.*s\)' > $bench2
echo `cat $bench2` $f >> $benchfile echo $(cat $bench2) $f >> $benchfile
} }
do_video_decoding() do_video_decoding()
......
...@@ -11,7 +11,7 @@ datadir="tests/data" ...@@ -11,7 +11,7 @@ datadir="tests/data"
logfile="$datadir/seek.regression" logfile="$datadir/seek.regression"
reffile="$1" reffile="$1"
list=`grep '^tests/data/[ab]-' "$reffile"` list=$(grep '^tests/data/[ab]-' "$reffile")
rm -f $logfile rm -f $logfile
for i in $list ; do for i in $list ; do
echo ---------------- >> $logfile echo ---------------- >> $logfile
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment