[03/20] tests/lavf-regression: Rename some variables for greater clarity

Message ID 20180920084729.4523-4-diego@biurrun.de
State New
Headers show
Series
  • [01/20] tests: Use more consistent names for tests
Related show

Commit Message

Diego Biurrun Sept. 20, 2018, 8:47 a.m.
---
 tests/lavf-regression.sh  | 30 +++++++++++++++---------------
 tests/regression-funcs.sh |  4 ++--
 2 files changed, 17 insertions(+), 17 deletions(-)

Patch

diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index fc9869cb9d..5c9a510403 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -13,32 +13,32 @@  eval do_$test=y
 
 do_lavf()
 {
-    file=${outfile}lavf.$1
+    file=${outdir}lavf.$1
     do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $2 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $3
     do_avconv_crc $file $DEC_OPTS -i $target_path/$file $4
 }
 
 do_streamed_images()
 {
-    file=${outfile}${1}pipe.$1
+    file=${outdir}${1}pipe.$1
     do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src -f image2pipe $ENC_OPTS -t 1 -qscale 10
     do_avconv_crc $file $DEC_OPTS -f image2pipe -i $target_path/$file
 }
 
 do_image_formats()
 {
-    outfile="$datadir/images/$1/"
-    mkdir -p "$outfile"
-    file=${outfile}%02d.$1
+    outdir="$datadir/images/$1/"
+    mkdir -p "$outdir"
+    file=${outdir}%02d.$1
     run_avconv $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $2 $ENC_OPTS $3 -frames 12 -y -qscale 10 $target_path/$file
-    do_md5sum ${outfile}02.$1
+    do_md5sum ${outdir}02.$1
     do_avconv_crc $file $DEC_OPTS $3 -i $target_path/$file
-    echo $(wc -c ${outfile}02.$1)
+    echo $(wc -c ${outdir}02.$1)
 }
 
 do_audio_only()
 {
-    file=${outfile}lavf.$1
+    file=${outdir}lavf.$1
     do_avconv $file $DEC_OPTS $2 -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 $3
     do_avconv_crc $file $DEC_OPTS $4 -i $target_path/$file
 }
@@ -52,7 +52,7 @@  do_lavf asf "" "-c:a mp2 -ar 44100" "-r 25"
 fi
 
 if [ -n "$do_rm" ] ; then
-file=${outfile}lavf.rm
+file=${outdir}lavf.rm
 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -t 1 -qscale 10 -c:a ac3_fixed -b:a 64k
 # broken
 #do_avconv_crc $file -i $target_path/$file
@@ -105,7 +105,7 @@  fi
 
 # streamed images
 # mjpeg
-#file=${outfile}lavf.mjpeg
+#file=${outdir}lavf.mjpeg
 #do_avconv $file -t 1 -qscale 10 -f image2 -c:v pgmyuv -i $raw_src
 #do_avconv_crc $file -i $target_path/$file
 
@@ -122,13 +122,13 @@  do_streamed_images ppm
 fi
 
 if [ -n "$do_gif" ] ; then
-file=${outfile}lavf.gif
+file=${outdir}lavf.gif
 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10 -pix_fmt rgb24
 do_avconv_crc $file $DEC_OPTS -i $target_path/$file -pix_fmt rgb24
 fi
 
 if [ -n "$do_y4m" ] ; then
-file=${outfile}lavf.$test
+file=${outdir}lavf.$test
 do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $ENC_OPTS -t 1 -qscale 10
 do_avconv_crc $file -i $target_path/$file
 fi
@@ -236,13 +236,13 @@  fi
 # pix_fmt conversions
 
 if [ -n "$do_pixfmt" ] ; then
-outfile="$datadir/pixfmt/"
-mkdir -p "$outfile"
+outdir="$datadir/pixfmt/"
+mkdir -p "$outdir"
 conversions="yuv420p yuv422p yuv444p yuyv422 yuv410p yuv411p yuvj420p \
              yuvj422p yuvj444p rgb24 bgr24 rgb32 rgb565 rgb555 gray monow \
              monob yuv440p yuvj440p"
 for pix_fmt in $conversions ; do
-    file=${outfile}${pix_fmt}.yuv
+    file=${outdir}${pix_fmt}.yuv
     run_avconv $DEC_OPTS -r 1 -f image2 -c:v pgmyuv -i $raw_src \
                $ENC_OPTS -f rawvideo -t 1 -s 352x288 -pix_fmt $pix_fmt $target_path/$raw_dst
     do_avconv $file $DEC_OPTS -f rawvideo -s 352x288 -pix_fmt $pix_fmt -i $target_path/$raw_dst \
diff --git a/tests/regression-funcs.sh b/tests/regression-funcs.sh
index 3728d44980..4dffd55221 100755
--- a/tests/regression-funcs.sh
+++ b/tests/regression-funcs.sh
@@ -16,7 +16,7 @@  datadir="./tests/data"
 target_datadir="${target_path}/${datadir}"
 
 this="$test.$test_ref"
-outfile="$datadir/$test_ref/"
+outdir="$datadir/$test_ref/"
 
 # various files
 avconv="$target_exec ${target_path}/avconv"
@@ -30,7 +30,7 @@  cleanfiles="$raw_dst $crcfile"
 trap 'rm -f -- $cleanfiles' EXIT
 
 mkdir -p "$datadir"
-mkdir -p "$outfile"
+mkdir -p "$outdir"
 
 [ "${V-0}" -gt 0 ] && echov=echov || echov=: