tests: Convert lavf container tests with samples to non-legacy test scripts
authorJames Almer <jamrial@gmail.com>
Thu, 14 Mar 2019 17:37:44 +0000 (14:37 -0300)
committerJames Almer <jamrial@gmail.com>
Thu, 14 Mar 2019 17:37:44 +0000 (14:37 -0300)
14 files changed:
tests/fate-run.sh
tests/fate/avformat.mak
tests/fate/lavf-container.mak
tests/lavf-regression.sh
tests/ref/lavf-fate/avi_cram [deleted file]
tests/ref/lavf-fate/cram.avi [new file with mode: 0644]
tests/ref/lavf-fate/latm
tests/ref/lavf-fate/mov_qtrle_mace6 [deleted file]
tests/ref/lavf-fate/mp3
tests/ref/lavf-fate/ogg_vp3 [deleted file]
tests/ref/lavf-fate/ogg_vp8 [deleted file]
tests/ref/lavf-fate/qtrle_mace6.mov [new file with mode: 0644]
tests/ref/lavf-fate/vp3.ogg [new file with mode: 0644]
tests/ref/lavf-fate/vp8.ogg [new file with mode: 0644]

index ebd5c14..7e6d2b1 100755 (executable)
@@ -310,6 +310,16 @@ lavf_container_timecode()
     lavf_container "" "$1"
 }
 
+lavf_container_fate()
+{
+    t="${test#lavf-fate-}"
+    outdir="tests/data/lavf-fate"
+    file=${outdir}/lavf.$t
+    input="${target_samples}/$1"
+    do_avconv $file $DEC_OPTS $2 -i "$input" "$ENC_OPTS -metadata title=lavftest" -vcodec copy -acodec copy
+    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
+}
+
 lavf_image(){
     t="${test#lavf-}"
     outdir="tests/data/images/$t"
index e2f4d01..5dfd0fa 100644 (file)
@@ -12,19 +12,6 @@ $(FATE_LAVF): CMP =
 FATE_AVCONV += $(FATE_LAVF)
 fate-lavf:     $(FATE_LAVF)
 
-FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGG_MUXER)          += ogg_vp3
-FATE_LAVF_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGV_MUXER)          += ogg_vp8
-FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXER        LATM_MUXER)         += latm
-FATE_LAVF_FATE-$(call ALLYES, MP3_DEMUXER        MP3_MUXER)          += mp3
-FATE_LAVF_FATE-$(call ALLYES, MOV_DEMUXER        MOV_MUXER)          += mov_qtrle_mace6
-FATE_LAVF_FATE-$(call ALLYES, AVI_DEMUXER        AVI_MUXER)          += avi_cram
-
-FATE_LAVF_FATE +=  $(FATE_LAVF_FATE-yes:%=fate-lavf-fate-%)
-$(FATE_LAVF_FATE): CMD = lavffatetest
-
-FATE_SAMPLES_FFMPEG += $(FATE_LAVF_FATE)
-fate-lavf-fate:        $(FATE_LAVF_FATE)
-
 tests/data/mp4-to-ts.m3u8: TAG = GEN
 tests/data/mp4-to-ts.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data
        $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \
index 2f3fd03..a531914 100644 (file)
@@ -55,3 +55,25 @@ fate-lavf-wtv: CMD = lavf_container "" "-c:a mp2 -threads 1"
 
 FATE_AVCONV += $(FATE_LAVF_CONTAINER)
 fate-lavf-container fate-lavf: $(FATE_LAVF_CONTAINER)
+
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGG_MUXER)          += vp3.ogg
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MATROSKA_DEMUXER   OGV_MUXER)          += vp8.ogg
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER        LATM_MUXER)         += latm
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MP3_DEMUXER        MP3_MUXER)          += mp3
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, MOV_DEMUXER        MOV_MUXER)          += qtrle_mace6.mov
+FATE_LAVF_CONTAINER_FATE-$(call ALLYES, AVI_DEMUXER        AVI_MUXER)          += cram.avi
+
+FATE_LAVF_CONTAINER_FATE = $(FATE_LAVF_CONTAINER_FATE-yes:%=fate-lavf-fate-%)
+
+$(FATE_LAVF_CONTAINER_FATE): REF = $(SRC_PATH)/tests/ref/lavf-fate/$(@:fate-lavf-fate-%=%)
+$(FATE_LAVF_CONTAINER_FATE): $(AREF) $(VREF)
+
+fate-lavf-fate-vp3.ogg: CMD = lavf_container_fate "vp3/coeff_level64.mkv" "-idct auto"
+fate-lavf-fate-vp8.ogg: CMD = lavf_container_fate "vp8/RRSF49-short.webm" "" "-acodec copy"
+fate-lavf-fate-latm: CMD = lavf_container_fate "aac/al04_44.mp4" "" "-acodec copy"
+fate-lavf-fate-mp3: CMD = lavf_container_fate "mp3-conformance/he_32khz.bit" "" "-acodec copy"
+fate-lavf-fate-qtrle_mace6.mov: CMD = lavf_container_fate "qtrle/Animation-16Greys.mov" "-idct auto"
+fate-lavf-fate-cram.avi: CMD = lavf_container_fate "cram/toon.avi" "-idct auto"
+
+FATE_SAMPLES_FFMPEG += $(FATE_LAVF_CONTAINER_FATE)
+fate-lavf-fate fate-lavf: $(FATE_LAVF_CONTAINER_FATE)
index 719aac2..cad96c1 100755 (executable)
@@ -13,43 +13,6 @@ eval do_$test=y
 
 ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
 
-do_lavf_fate()
-{
-    file=${outfile}lavf.$1
-    input="${target_samples}/$2"
-    do_avconv $file $DEC_OPTS -i "$input" $ENC_OPTS -vcodec copy -acodec copy
-    do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
-}
-
-if [ -n "$do_mp3" ] ; then
-do_lavf_fate mp3 "mp3-conformance/he_32khz.bit" "-acodec copy"
-fi
-
-if [ -n "$do_latm" ] ; then
-do_lavf_fate latm "aac/al04_44.mp4" "-acodec copy"
-fi
-
-if [ -n "$do_ogg_vp3" ] ; then
-# -idct simple causes different results on different systems
-DEC_OPTS="$DEC_OPTS -idct auto"
-do_lavf_fate ogg "vp3/coeff_level64.mkv"
-fi
-
-if [ -n "$do_ogg_vp8" ] ; then
-do_lavf_fate ogv "vp8/RRSF49-short.webm" "-acodec copy"
-fi
-
-if [ -n "$do_mov_qtrle_mace6" ] ; then
-DEC_OPTS="$DEC_OPTS -idct auto"
-do_lavf_fate mov "qtrle/Animation-16Greys.mov"
-fi
-
-if [ -n "$do_avi_cram" ] ; then
-DEC_OPTS="$DEC_OPTS -idct auto"
-do_lavf_fate avi "cram/toon.avi"
-fi
-
-
 # streamed images
 # mjpeg
 #file=${outfile}lavf.mjpeg
diff --git a/tests/ref/lavf-fate/avi_cram b/tests/ref/lavf-fate/avi_cram
deleted file mode 100644 (file)
index 82882fb..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-6fc88702c23b895c305c5e1f51a0904e *./tests/data/lavf-fate/lavf.avi
-928260 ./tests/data/lavf-fate/lavf.avi
-./tests/data/lavf-fate/lavf.avi CRC=0xa4770de2
diff --git a/tests/ref/lavf-fate/cram.avi b/tests/ref/lavf-fate/cram.avi
new file mode 100644 (file)
index 0000000..a591889
--- /dev/null
@@ -0,0 +1,3 @@
+6fc88702c23b895c305c5e1f51a0904e *tests/data/lavf-fate/lavf.cram.avi
+928260 tests/data/lavf-fate/lavf.cram.avi
+tests/data/lavf-fate/lavf.cram.avi CRC=0xa4770de2
index 8c4f541..c41384d 100644 (file)
@@ -1,3 +1,3 @@
-eb13788e71c9b5bc7d62ceb748312bbb *./tests/data/lavf-fate/lavf.latm
-67876 ./tests/data/lavf-fate/lavf.latm
-./tests/data/lavf-fate/lavf.latm CRC=0xcf94c59d
+eb13788e71c9b5bc7d62ceb748312bbb *tests/data/lavf-fate/lavf.latm
+67876 tests/data/lavf-fate/lavf.latm
+tests/data/lavf-fate/lavf.latm CRC=0xcf94c59d
diff --git a/tests/ref/lavf-fate/mov_qtrle_mace6 b/tests/ref/lavf-fate/mov_qtrle_mace6
deleted file mode 100644 (file)
index e8fc882..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-f0ae34fb90e11342624e092094273aef *./tests/data/lavf-fate/lavf.mov
-1270415 ./tests/data/lavf-fate/lavf.mov
-./tests/data/lavf-fate/lavf.mov CRC=0x9320cd26
index b559538..bd65cbb 100644 (file)
@@ -1,3 +1,3 @@
-f231c5316357fd747573cbcb02f889c5 *./tests/data/lavf-fate/lavf.mp3
-96016 ./tests/data/lavf-fate/lavf.mp3
-./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
+f231c5316357fd747573cbcb02f889c5 *tests/data/lavf-fate/lavf.mp3
+96016 tests/data/lavf-fate/lavf.mp3
+tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
diff --git a/tests/ref/lavf-fate/ogg_vp3 b/tests/ref/lavf-fate/ogg_vp3
deleted file mode 100644 (file)
index 9e9cc7e..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-4bd51dac3194fa88ae33767c25b4b1e6 *./tests/data/lavf-fate/lavf.ogg
-417621 ./tests/data/lavf-fate/lavf.ogg
-./tests/data/lavf-fate/lavf.ogg CRC=0x037e3e79
diff --git a/tests/ref/lavf-fate/ogg_vp8 b/tests/ref/lavf-fate/ogg_vp8
deleted file mode 100644 (file)
index 78131f3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-c56d8dce728d46d4f0ab4c7cc9f86abc *./tests/data/lavf-fate/lavf.ogv
-95009 ./tests/data/lavf-fate/lavf.ogv
-./tests/data/lavf-fate/lavf.ogv CRC=0x8c067a66
diff --git a/tests/ref/lavf-fate/qtrle_mace6.mov b/tests/ref/lavf-fate/qtrle_mace6.mov
new file mode 100644 (file)
index 0000000..85c585f
--- /dev/null
@@ -0,0 +1,3 @@
+f0ae34fb90e11342624e092094273aef *tests/data/lavf-fate/lavf.qtrle_mace6.mov
+1270415 tests/data/lavf-fate/lavf.qtrle_mace6.mov
+tests/data/lavf-fate/lavf.qtrle_mace6.mov CRC=0x9320cd26
diff --git a/tests/ref/lavf-fate/vp3.ogg b/tests/ref/lavf-fate/vp3.ogg
new file mode 100644 (file)
index 0000000..f4e22dc
--- /dev/null
@@ -0,0 +1,3 @@
+4bd51dac3194fa88ae33767c25b4b1e6 *tests/data/lavf-fate/lavf.vp3.ogg
+417621 tests/data/lavf-fate/lavf.vp3.ogg
+tests/data/lavf-fate/lavf.vp3.ogg CRC=0x037e3e79
diff --git a/tests/ref/lavf-fate/vp8.ogg b/tests/ref/lavf-fate/vp8.ogg
new file mode 100644 (file)
index 0000000..1a40825
--- /dev/null
@@ -0,0 +1,3 @@
+c56d8dce728d46d4f0ab4c7cc9f86abc *tests/data/lavf-fate/lavf.vp8.ogg
+95009 tests/data/lavf-fate/lavf.vp8.ogg
+tests/data/lavf-fate/lavf.vp8.ogg CRC=0x8c067a66