From ea57502c82a91362daeafec392375706fa266d8b Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 19 Jun 2011 16:19:06 +0100 Subject: [PATCH] fate: remove output redirections from old regtest scripts All tests are run through the fate-run.sh script which already sets up redirections. Using the outputs set there simplifies things somewhat. Signed-off-by: Mans Rullgard --- tests/codec-regression.sh | 10 ++++------ tests/fate-run.sh | 3 --- tests/lavf-regression.sh | 6 ++---- tests/lavfi-regression.sh | 6 ++---- tests/regression-funcs.sh | 23 ++++++++--------------- 5 files changed, 16 insertions(+), 32 deletions(-) diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index a858250..ccedbdb 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -11,8 +11,6 @@ set -e eval do_$test=y -rm -f "$logfile" - # generate reference for quality check if [ -n "$do_vref" ]; then do_ffmpeg $raw_ref -f image2 -vcodec pgmyuv -i $raw_src -an -f rawvideo @@ -265,14 +263,14 @@ fi if [ -n "$do_mp2" ] ; then do_audio_encoding mp2.mp2 do_audio_decoding -$tiny_psnr $pcm_dst $pcm_ref 2 1924 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 1924 fi if [ -n "$do_ac3_fixed" ] ; then do_audio_encoding ac3.rm "-vn -acodec ac3_fixed" # binaries configured with --disable-sse decode ac3 differently #do_audio_decoding -#$tiny_psnr $pcm_dst $pcm_ref 2 1024 >> $logfile +#$tiny_psnr $pcm_dst $pcm_ref 2 1024 fi if [ -n "$do_g726" ] ; then @@ -318,12 +316,12 @@ fi if [ -n "$do_wmav1" ] ; then do_audio_encoding wmav1.asf "-acodec wmav1" do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav -$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 8192 fi if [ -n "$do_wmav2" ] ; then do_audio_encoding wmav2.asf "-acodec wmav2" do_ffmpeg_nomd5 $pcm_dst $DEC_OPTS -i $target_path/$file -f wav -$tiny_psnr $pcm_dst $pcm_ref 2 8192 >> $logfile +$tiny_psnr $pcm_dst $pcm_ref 2 8192 fi #if [ -n "$do_vorbis" ] ; then diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 366145d..2c744b8 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -76,9 +76,6 @@ pcm(){ regtest(){ t="${test#$2-}" ref=${base}/ref/$2/$t - cleanfiles="$cleanfiles $outfile $errfile" - outfile=tests/data/regression/$2/$t - errfile=tests/data/$t.$2.err ${base}/${1}-regression.sh $t $2 $3 "$target_exec" "$target_path" "$threads" "$thread_type" } diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh index 39e752b..d7e6840 100755 --- a/tests/lavf-regression.sh +++ b/tests/lavf-regression.sh @@ -31,9 +31,9 @@ do_image_formats() mkdir -p "$outfile" file=${outfile}%02d.$1 run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $2 $ENC_OPTS $3 -t 0.5 -y -qscale 10 $target_path/$file - do_md5sum ${outfile}02.$1 >> $logfile + do_md5sum ${outfile}02.$1 do_ffmpeg_crc $file $DEC_OPTS $3 -i $target_path/$file - wc -c ${outfile}02.$1 >> $logfile + wc -c ${outfile}02.$1 } do_audio_only() @@ -43,8 +43,6 @@ do_audio_only() do_ffmpeg_crc $file $DEC_OPTS $4 -i $target_path/$file } -rm -f "$logfile" - if [ -n "$do_avi" ] ; then do_lavf avi fi diff --git a/tests/lavfi-regression.sh b/tests/lavfi-regression.sh index b2a195a..4a483e6 100755 --- a/tests/lavfi-regression.sh +++ b/tests/lavfi-regression.sh @@ -11,15 +11,13 @@ set -e eval do_$test=y -rm -f "$logfile" - do_video_filter() { label=$1 filters=$2 shift 2 - printf '%-20s' $label >>$logfile + printf '%-20s' $label run_ffmpeg $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src \ - $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: >>$logfile + $ENC_OPTS -vf "$filters" -vcodec rawvideo $* -f nut md5: } do_lavfi() { diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh index e57cdf1..979157b 100755 --- a/tests/regression-funcs.sh +++ b/tests/regression-funcs.sh @@ -15,10 +15,7 @@ datadir="./tests/data" target_datadir="${target_path}/${datadir}" this="$test.$test_ref" -logdir="$datadir/regression/$test_ref" -logfile="$logdir/$test" outfile="$datadir/$test_ref/" -errfile="$datadir/$this.err" # various files ffmpeg="$target_exec ${target_path}/ffmpeg" @@ -37,12 +34,8 @@ trap 'rm -f -- $cleanfiles' EXIT mkdir -p "$datadir" mkdir -p "$outfile" -mkdir -p "$logdir" - -(exec >&3) 2>/dev/null || exec 3>&2 [ "${V-0}" -gt 0 ] && echov=echov || echov=: -[ "${V-0}" -gt 1 ] || exec 2>$errfile echov(){ echo "$@" >&3 @@ -67,13 +60,13 @@ do_ffmpeg() shift set -- $* ${target_path}/$f run_ffmpeg $* - do_md5sum $f >> $logfile + do_md5sum $f if [ $f = $raw_dst ] ; then - $tiny_psnr $f $raw_ref >> $logfile + $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then - $tiny_psnr $f $pcm_ref 2 >> $logfile + $tiny_psnr $f $pcm_ref 2 else - wc -c $f >> $logfile + wc -c $f fi } @@ -84,11 +77,11 @@ do_ffmpeg_nomd5() set -- $* ${target_path}/$f run_ffmpeg $* if [ $f = $raw_dst ] ; then - $tiny_psnr $f $raw_ref >> $logfile + $tiny_psnr $f $raw_ref elif [ $f = $pcm_dst ] ; then - $tiny_psnr $f $pcm_ref 2 >> $logfile + $tiny_psnr $f $pcm_ref 2 else - wc -c $f >> $logfile + wc -c $f fi } @@ -97,7 +90,7 @@ do_ffmpeg_crc() f="$1" shift run_ffmpeg $* -f crc "$target_crcfile" - echo "$f $(cat $crcfile)" >> $logfile + echo "$f $(cat $crcfile)" } do_video_decoding() -- 2.7.4