[18/20] tests: Use a predefined function for lavf-rm test

Message ID 20180920084729.4523-19-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/fate-run.sh        | 3 ++-
 tests/fate/avformat.mak  | 4 +++-
 tests/lavf-regression.sh | 8 --------
 tests/ref/lavf/rm        | 4 ++--
 4 files changed, 7 insertions(+), 12 deletions(-)

Patch

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index d6eb556dae..2626a894a0 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -210,7 +210,8 @@  lavf(){
     t="${test#lavf-}"
     file=${outdir}/lavf.$t
     do_avconv $file $DEC_OPTS -f image2 -c:v pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le $1 -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2
-    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
+    test $3 = "disable_crc" ||
+        do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
 }
 
 streamed_images(){
diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
index d27de75185..4ecbb1d4bf 100644
--- a/tests/fate/avformat.mak
+++ b/tests/fate/avformat.mak
@@ -1,5 +1,4 @@ 
 FATE_LAVF-$(call ENCDEC,  GIF,                   IMAGE2)             += gif
-FATE_LAVF-$(call ENCMUX,  RV10 AC3_FIXED,        RM)                 += rm
 FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)                               += y4m
 
 
@@ -14,6 +13,7 @@  FATE_LAVF_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2,       MPEG1SYSTEM MPEGPS) += mpg
 FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)                += mxf
 FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)        += mxf_d10
 FATE_LAVF_LAVF-$(call ENCDEC2, MPEG4,      MP2,       NUT)                += nut
+FATE_LAVF_LAVF-$(call ENCMUX,  RV10 AC3_FIXED,        RM)                 += rm
 FATE_LAVF_LAVF-$(call ENCDEC,  FLV,                   SWF)                += swf
 FATE_LAVF_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2,       MPEGTS)             += ts
 
@@ -33,6 +33,8 @@  fate-lavf-mov: CMD = lavf "" "-c:a pcm_alaw -c:v mpeg4"
 fate-lavf-mpg: CMD = lavf "" "-ar 44100"
 fate-lavf-mxf: CMD = lavf "-ar 48000" "-bf 2 -timecode_frame_start 264363"
 fate-lavf-mxf_d10: CMD = lavf "-ar 48000 -ac 2" "-r 25 -vf scale=720:576,pad=720:608:0:32 -c:v mpeg2video -g 0 -flags +ildct+low_delay -dc 10 -non_linear_quant 1 -intra_vlc 1 -qscale 1 -ps 1 -qmin 1 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -pix_fmt yuv422p -minrate 30000k -maxrate 30000k -b 30000k -bufsize 1200000 -top 1 -rc_init_occupancy 1200000 -qmax 12 -f mxf_d10"
+# The lavf-rm CRC test is broken
+fate-lavf-rm:  CMD = lavf "" "-c:a ac3_fixed" disable_crc
 fate-lavf-ts:  CMD = lavf "" "-mpegts_transport_stream_id 42 -ar 44100"
 
 
diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index 3d8f46d215..a82c23e809 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -11,14 +11,6 @@  set -e
 
 eval do_$test=y
 
-if [ -n "$do_rm" ] ; then
-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
-fi
-
-
 # streamed images
 # mjpeg
 #file=${outdir}lavf.mjpeg
diff --git a/tests/ref/lavf/rm b/tests/ref/lavf/rm
index 4793d67e75..d287309f29 100644
--- a/tests/ref/lavf/rm
+++ b/tests/ref/lavf/rm
@@ -1,2 +1,2 @@ 
-9eeb3b91c0a45f519fd7f2efea882cf4 *./tests/data/fate/lavf.rm
-346414 ./tests/data/fate/lavf.rm
+9eeb3b91c0a45f519fd7f2efea882cf4 *tests/data/fate/lavf.rm
+346414 tests/data/fate/lavf.rm