fate: handle lavf test dependencies entirely in make
authorMans Rullgard <mans@mansr.com>
Tue, 16 Oct 2012 13:06:41 +0000 (14:06 +0100)
committerMans Rullgard <mans@mansr.com>
Wed, 17 Oct 2012 21:31:18 +0000 (22:31 +0100)
This makes the lavf tests depend on all codecs and formats they use.

Signed-off-by: Mans Rullgard <mans@mansr.com>
configure
tests/Makefile
tests/fate/avformat.mak [new file with mode: 0644]

index 75468d9..74b9b04 100755 (executable)
--- a/configure
+++ b/configure
@@ -1723,49 +1723,6 @@ avserver_extralibs='$ldl'
 
 doc_deps="texi2html"
 
-# tests
-
-mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
-seek_lavf_mxf_d10_test_deps="mxf_d10_test"
-
-test_deps(){
-    suf1=$1
-    suf2=$2
-    shift 2
-    for v; do
-        dep=${v%=*}
-        tests=${v#*=}
-        for name in ${tests}; do
-            append ${name}_test_deps ${dep}$suf1 ${dep}$suf2
-        done
-    done
-}
-
-test_deps _muxer _demuxer                                               \
-    aiff                                                                \
-    pcm_alaw=alaw                                                       \
-    asf                                                                 \
-    au                                                                  \
-    avi                                                                 \
-    dv=dv_fmt                                                           \
-    ffm                                                                 \
-    flv=flv_fmt                                                         \
-    gxf                                                                 \
-    matroska=mkv                                                        \
-    mmf                                                                 \
-    mov                                                                 \
-    pcm_mulaw=mulaw                                                     \
-    mxf="mxf mxf_d10"                                                   \
-    nut                                                                 \
-    ogg                                                                 \
-    rawvideo=pixfmt                                                     \
-    rm                                                                  \
-    swf                                                                 \
-    mpegts=ts                                                           \
-    voc                                                                 \
-    wav                                                                 \
-    yuv4mpegpipe=yuv4mpeg                                               \
-
 # default parameters
 
 logfile="config.log"
@@ -1919,11 +1876,10 @@ find_tests(){
     map "echo ${2}\${v}_test" $(ls "$source_path"/tests/ref/$1 | grep -v '[^-a-z0-9_]')
 }
 
-LAVF_TESTS=$(find_tests lavf)
 LAVFI_TESTS=$(find_tests lavfi)
 SEEK_TESTS=$(find_tests seek seek_)
 
-ALL_TESTS="$LAVF_TESTS $LAVFI_TESTS $SEEK_TESTS"
+ALL_TESTS="$LAVFI_TESTS $SEEK_TESTS"
 
 for n in $COMPONENT_LIST; do
     v=$(toupper ${n%s})_LIST
@@ -3826,7 +3782,6 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST       \
                                      $ALL_COMPONENTS    \
 
 cat >>config.mak <<EOF
-LAVF_TESTS=$(print_enabled   -n _test $LAVF_TESTS)
 LAVFI_TESTS=$(print_enabled  -n _test $LAVFI_TESTS)
 SEEK_TESTS=$(print_enabled   -n _test $SEEK_TESTS)
 EOF
index 58964d7..c2d39e3 100644 (file)
@@ -35,6 +35,7 @@ ENCDEC2 = $(call ALLYES, $(firstword $(1))_ENCODER $(lastword $(1))_DECODER  \
 
 include $(SRC_PATH)/tests/fate/acodec.mak
 include $(SRC_PATH)/tests/fate/vcodec.mak
+include $(SRC_PATH)/tests/fate/avformat.mak
 
 include $(SRC_PATH)/tests/fate/aac.mak
 include $(SRC_PATH)/tests/fate/ac3.mak
@@ -83,12 +84,10 @@ include $(SRC_PATH)/tests/fate/vqf.mak
 include $(SRC_PATH)/tests/fate/wavpack.mak
 include $(SRC_PATH)/tests/fate/wma.mak
 
-FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
 
-FATE_AVCONV += $(FATE_LAVF)                                             \
-               $(FATE_LAVFI)                                            \
+FATE_AVCONV += $(FATE_LAVFI)                                            \
                $(FATE_SEEK)                                             \
 
 FATE_AVCONV += $(FATE_AVCONV-yes)
@@ -105,15 +104,12 @@ FATE += $(FATE_LIBAVUTIL)
 
 $(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
 
-$(FATE_LAVF):  $(AREF) $(VREF)
 $(FATE_LAVFI): $(VREF) libavfilter/filtfmts-test$(EXESUF)
 $(FATE_SEEK):  fate-acodec fate-vsynth2 fate-lavf libavformat/seek-test$(EXESUF)
 
-$(FATE_LAVF):    CMD = lavftest
 $(FATE_LAVFI):   CMD = lavfitest
 $(FATE_SEEK):    CMD = seektest
 
-fate-lavf:   $(FATE_LAVF)
 fate-lavfi:  $(FATE_LAVFI)
 fate-seek:   $(FATE_SEEK)
 
diff --git a/tests/fate/avformat.mak b/tests/fate/avformat.mak
new file mode 100644 (file)
index 0000000..4401423
--- /dev/null
@@ -0,0 +1,53 @@
+FATE_LAVF-$(call ENCDEC,  PCM_S16BE,             AIFF)               += aiff
+FATE_LAVF-$(call ENCDEC,  PCM_ALAW,              PCM_ALAW)           += alaw
+FATE_LAVF-$(call ENCDEC2, MSMPEG4V3,  MP2,       ASF)                += asf
+FATE_LAVF-$(call ENCDEC,  PCM_S16BE,             AU)                 += au
+FATE_LAVF-$(call ENCDEC2, MPEG4,      MP2,       AVI)                += avi
+FATE_LAVF-$(call ENCDEC,  BMP,                   IMAGE2)             += bmp
+FATE_LAVF-$(call ENCDEC,  DPX,                   IMAGE2)             += dpx
+FATE_LAVF-$(call ENCDEC2, DVVIDEO,    PCM_S16LE, AVI)                += dv_fmt
+FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2,       FFM)                += ffm
+FATE_LAVF-$(call ENCDEC,  FLV,                   FLV)                += flv_fmt
+FATE_LAVF-$(call ENCDEC,  GIF,                   IMAGE2)             += gif
+FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)                += gxf
+FATE_LAVF-$(call ENCDEC,  MJPEG,                 IMAGE2)             += jpg
+FATE_LAVF-$(call ENCDEC2, MPEG4,      MP2,       MATROSKA)           += mkv
+FATE_LAVF-$(call ENCDEC,  ADPCM_YAMAHA,          MMF)                += mmf
+FATE_LAVF-$(call ENCDEC2, MPEG4,      PCM_ALAW,  MOV)                += mov
+FATE_LAVF-$(call ENCDEC2, MPEG1VIDEO, MP2,       MPEG1SYSTEM MPEGPS) += mpg
+FATE_LAVF-$(call ENCDEC,  PCM_MULAW,             PCM_MULAW)          += mulaw
+FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)                += mxf
+FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF)        += mxf_d10
+FATE_LAVF-$(call ENCDEC2, MPEG4,      MP2,       NUT)                += nut
+FATE_LAVF-$(call ENCDEC,  FLAC,                  OGG)                += ogg
+FATE_LAVF-$(call ENCDEC,  PAM,                   IMAGE2)             += pam
+FATE_LAVF-$(call ENCDEC,  PBM,                   IMAGE2PIPE)         += pbmpipe
+FATE_LAVF-$(call ENCDEC,  PCX,                   IMAGE2)             += pcx
+FATE_LAVF-$(call ENCDEC,  PGM,                   IMAGE2)             += pgm
+FATE_LAVF-$(call ENCDEC,  PGM,                   IMAGE2PIPE)         += pgmpipe
+FATE_LAVF-$(call ENCDEC,  PNG,                   IMAGE2)             += png
+FATE_LAVF-$(call ENCDEC,  PPM,                   IMAGE2)             += ppm
+FATE_LAVF-$(call ENCDEC,  PPM,                   IMAGE2PIPE)         += ppmpipe
+FATE_LAVF-$(call ALLYES,  RV10_ENCODER AC3_FIXED_ENCODER RM_MUXER)   += rm
+FATE_LAVF-$(call ENCDEC,  PCM_U8,                RSO)                += rso
+FATE_LAVF-$(call ENCDEC,  SGI,                   IMAGE2)             += sgi
+FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             SOX)                += sox
+FATE_LAVF-$(call ENCDEC,  SUNRAST,               IMAGE2)             += sunrast
+FATE_LAVF-$(call ENCDEC,  FLV,                   SWF)                += swf
+FATE_LAVF-$(call ENCDEC,  TARGA,                 IMAGE2)             += tga
+FATE_LAVF-$(call ENCDEC,  TIFF,                  IMAGE2)             += tiff
+FATE_LAVF-$(call ENCDEC2, MPEG2VIDEO, MP2,       MPEGTS)             += ts
+FATE_LAVF-$(call ENCDEC,  PCM_U8,                VOC)                += voc
+FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             VOC)                += voc_s16
+FATE_LAVF-$(call ENCDEC,  PCM_S16LE,             WAV)                += wav
+FATE_LAVF-$(call ENCDEC,  XWD,                   IMAGE2)             += xwd
+FATE_LAVF-$(CONFIG_YUV4MPEGPIPE_MUXER)                               += yuv4mpeg
+
+FATE_LAVF += $(FATE_LAVF-yes:%=fate-lavf-%)
+FATE_LAVF += fate-lavf-pixfmt
+
+$(FATE_LAVF): $(AREF) $(VREF)
+$(FATE_LAVF): CMD = lavftest
+
+FATE_AVCONV += $(FATE_LAVF)
+fate-lavf:     $(FATE_LAVF)