diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-04 12:04:21 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-05-06 05:39:25 +0200 |
commit | 95cbd97ccefc151e7ed7e0f32ea4584b2ea44e9c (patch) | |
tree | ff673e541033db998cec601db09e780d45968dff /tests/fate-run.sh | |
parent | 80c7258b3a8f7e77abfed53a5bce7c23e25caad6 (diff) | |
download | ffmpeg-95cbd97ccefc151e7ed7e0f32ea4584b2ea44e9c.tar.gz |
tests/Makefile: Redo how to keep intermediate FATE-files
Extend the ordinary mechanism to signal KEEP for this.
This also allows to remove the keep-parameter from enc_dec,
transcode and stream_remux, so that several empty parameters
'""' could be removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'tests/fate-run.sh')
-rwxr-xr-x | tests/fate-run.sh | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 2606fcb917..42cd50f50f 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -205,11 +205,11 @@ enc_dec(){ enc_opt=$4 dec_fmt=$5 dec_opt=$6 - ffprobe_opts=$9 + ffprobe_opts=$8 encfile="${outdir}/${test}.${enc_fmt}" decfile="${outdir}/${test}.out.${dec_fmt}" cleanfiles="$cleanfiles $decfile" - test "$7" = -keep || cleanfiles="$cleanfiles $encfile" + test "$keep" -ge 1 || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) tencfile=$(target_path $encfile) tdecfile=$(target_path $decfile) @@ -217,7 +217,7 @@ enc_dec(){ -f $enc_fmt -y $tencfile || return do_md5sum $encfile echo $(wc -c $encfile) - ffmpeg -auto_conversion_filters $8 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ + ffmpeg -auto_conversion_filters $7 $DEC_OPTS -i $tencfile $ENC_OPTS $dec_opt $FLAGS \ -f $dec_fmt -y $tdecfile || return do_md5sum $decfile tests/tiny_psnr${HOSTEXECSUF} $srcfile $decfile $cmp_unit $cmp_shift @@ -231,12 +231,12 @@ transcode(){ enc_fmt=$3 enc_opt=$4 final_encode=$5 - ffprobe_opts=$7 - additional_input=$8 - final_decode=$9 + ffprobe_opts=$6 + additional_input=$7 + final_decode=$8 test -z "$additional_input" || additional_input="$DEC_OPTS $additional_input" encfile="${outdir}/${test}.${enc_fmt}" - test "$6" = -keep || cleanfiles="$cleanfiles $encfile" + test $keep -ge 1 || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) tencfile=$(target_path $encfile) ffmpeg -f $src_fmt $DEC_OPTS -i $tsrcfile $additional_input \ @@ -255,9 +255,9 @@ stream_remux(){ enc_fmt=$3 stream_maps=$4 final_decode=$5 - ffprobe_opts=$7 + ffprobe_opts=$6 encfile="${outdir}/${test}.${enc_fmt}" - test "$6" = -keep || cleanfiles="$cleanfiles $encfile" + test $keep -ge 1 || cleanfiles="$cleanfiles $encfile" tsrcfile=$(target_path $srcfile) tencfile=$(target_path $encfile) ffmpeg -f $src_fmt -i $tsrcfile $stream_maps -codec copy $FLAGS \ @@ -598,7 +598,7 @@ if test $err != 0 && test $gen != "no" ; then fi if test $err = 0; then - if test $keep = 0; then + if test $keep -lt 2; then rm -f $outfile $errfile $cmpfile $cleanfiles fi elif test $gen = "no"; then |