You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	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 <mans@mansr.com>
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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" | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user