diff mbox series

[FFmpeg-devel,22/32] fate/seek: Don't duplicate test requirements

Message ID AS8PR01MB794478A2E3A86B48A008C42A8FF99@AS8PR01MB7944.eurprd01.prod.exchangelabs.com
State Accepted
Commit cad6381f1351e74cb521f38cb5a3ddf913ad1f16
Headers show
Series [FFmpeg-devel,01/32] fate/matroska: Use REMUX and TRANSCODE where appropriate | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt April 24, 2022, 3:34 a.m. UTC
Most of the tests in seek.mak use files created by other tests
as input. Therefore these tests have the other tests as prerequisite
and duplicate their CONFIG-requirements. This duplication is of course
bad as usual, so stop it by using the corresponding variable
that contains the non-seek-tests that are enabled to filter out all
the seek-tests without a corresponding enabled non-seek test.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 tests/Makefile      |   1 +
 tests/fate/seek.mak | 189 ++++++++++++++++----------------------------
 2 files changed, 68 insertions(+), 122 deletions(-)
diff mbox series

Patch

diff --git a/tests/Makefile b/tests/Makefile
index 1c9e3594c0..e02eb57035 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -120,6 +120,7 @@  include $(SRC_PATH)/tests/fate/lavf-container.mak
 include $(SRC_PATH)/tests/fate/lavf-image.mak
 include $(SRC_PATH)/tests/fate/lavf-image2pipe.mak
 include $(SRC_PATH)/tests/fate/lavf-video.mak
+# Must be included after acodec.mak, vcodec.mak and lavf-*.mak
 include $(SRC_PATH)/tests/fate/seek.mak
 
 include $(SRC_PATH)/tests/fate/aac.mak
diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak
index b4e9246cc3..fc1ef50e49 100644
--- a/tests/fate/seek.mak
+++ b/tests/fate/seek.mak
@@ -1,32 +1,16 @@ 
 # files from fate-acodec
 
-FATE_SEEK_ACODEC-$(call ENCDEC, ADPCM_IMA_QT,  AIFF)    += adpcm-ima_qt \
-                                                           adpcm-ima_qt-trellis
-FATE_SEEK_ACODEC-$(call ENCDEC, ADPCM_IMA_WAV, WAV)     += adpcm-ima_wav \
-                                                           adpcm-ima_wav-trellis
-FATE_SEEK_ACODEC-$(call ENCDEC, ADPCM_MS,      WAV)     += adpcm-ms      \
-                                                           adpcm-ms-trellis
-FATE_SEEK_ACODEC-$(call ENCDEC, ADPCM_SWF,     FLV)     += adpcm-swf     \
-                                                           adpcm-swf-trellis
-FATE_SEEK_ACODEC-$(call ENCDEC, ADPCM_YAMAHA,  WAV)     += adpcm-yamaha  \
-                                                           adpcm-yamaha-trellis
-FATE_SEEK_ACODEC-$(call ENCDEC, ALAC,          MOV)     += alac
-FATE_SEEK_ACODEC-$(call ENCDEC, FLAC,          FLAC)    += flac
-FATE_SEEK_ACODEC-$(call ENCDEC, MP2,           MP2 MP3) += mp2
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_ALAW,      WAV)     += pcm-alaw
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_MULAW,     WAV)     += pcm-mulaw
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S8,        MOV)     += pcm-s8
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_U8,        WAV)     += pcm-u8
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S16BE,     MOV)     += pcm-s16be
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S16LE,     WAV)     += pcm-s16le
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S24BE,     MOV)     += pcm-s24be
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S24LE,     WAV)     += pcm-s24le
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S32BE,     MOV)     += pcm-s32be
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_S32LE,     WAV)     += pcm-s32le
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_F32BE,     AU)      += pcm-f32be
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_F32LE,     WAV)     += pcm-f32le
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_F64BE,     AU)      += pcm-f64be
-FATE_SEEK_ACODEC-$(call ENCDEC, PCM_F64LE,     WAV)     += pcm-f64le
+FATE_SEEK_ACODEC += adpcm-ima_qt  adpcm-ima_qt-trellis  \
+                    adpcm-ima_wav adpcm-ima_wav-trellis \
+                    adpcm-ms      adpcm-ms-trellis      \
+                    adpcm-swf     adpcm-swf-trellis     \
+                    adpcm-yamaha  adpcm-yamaha-trellis  \
+                    alac flac mp2                       \
+                    pcm-alaw  pcm-mulaw pcm-s8 pcm-u8   \
+                    pcm-s16be pcm-s16le pcm-s24be       \
+                    pcm-s24le pcm-s32be pcm-s32le       \
+                    pcm-f32be pcm-f32le pcm-f64be       \
+                    pcm-f64le                           \
 
 fate-seek-acodec-adpcm-ima_qt:  SRC = fate/acodec-adpcm-ima_qt.aiff
 fate-seek-acodec-adpcm-ima_wav: SRC = fate/acodec-adpcm-ima_wav.wav
@@ -56,57 +40,37 @@  fate-seek-acodec-pcm-s32le:     SRC = fate/acodec-pcm-s32le.wav
 fate-seek-acodec-pcm-s8:        SRC = fate/acodec-pcm-s8.mov
 fate-seek-acodec-pcm-u8:        SRC = fate/acodec-pcm-u8.wav
 
-FATE_SEEK += $(FATE_SEEK_ACODEC-yes:%=fate-seek-acodec-%)
+FATE_SEEK_ACODEC := $(FATE_SEEK_ACODEC:%=fate-seek-acodec-%)
+# The following disables every fate-seek-* test whose
+# corresponding fate-* test has unmet requirements (or is disabled).
+FATE_SEEK_ACODEC := $(filter $(subst fate-,fate-seek-,$(FATE_ACODEC)), $(FATE_SEEK_ACODEC))
+FATE_SEEK += $(FATE_SEEK_ACODEC)
 
 # files from fate-vsynth_lena
 
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV1,          AVI)     += asv1
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ASV2,          AVI)     += asv2
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD,         DNXHD)   += dnxhd-720p
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD,         DNXHD)   += dnxhd-720p-rd
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DNXHD,         MOV)     += dnxhd-1080i
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,       DV)      += dv
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,       DV)      += dv-411
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, DVVIDEO,       DV)      += dv-50
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, FFV1,          AVI)     += ffv1
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, FLASHSV,       FLV)     += flashsv
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, FLV,           FLV)     += flv
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, H261,          AVI)     += h261
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, H263,          AVI)     += h263
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, H263,          AVI)     += h263p
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, HUFFYUV,       AVI)     += huffyuv
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, JPEGLS,        AVI)     += jpegls
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, LJPEG MJPEG,   AVI)     += ljpeg
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MJPEG,         AVI)     += mjpeg
-
-FATE_SEEK_VSYNTH_LENA-$(call ALLYES, DNXHD_ENCODER DNXHD_DECODER LARGE_TESTS) += dnxhd-4k-hr-lb
-
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MPEG1VIDEO, MPEG1VIDEO MPEGVIDEO) +=    \
-                                                    mpeg1                    \
-                                                    mpeg1b
-
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MPEG2VIDEO, MPEG2VIDEO MPEGVIDEO) +=    \
-                                                    mpeg2-422                \
-                                                    mpeg2-idct-int           \
-                                                    mpeg2-ilace              \
-                                                    mpeg2-ivlc-qprd          \
-                                                    mpeg2-thread             \
-                                                    mpeg2-thread-ivlc
-
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MPEG4,         MP4 MOV) += mpeg4
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MPEG4, AVI)             += $(FATE_MPEG4_AVI)
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MSMPEG4V3,     AVI)     += msmpeg4
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, MSMPEG4V2,     AVI)     += msmpeg4v2
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, RAWVIDEO,      AVI)     += rgb
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, ROQ,           ROQ)     += roqvideo
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, RV10,          RM)      += rv10
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, RV20,          RM)      += rv20
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, SNOW,          AVI)     += snow
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, SNOW,          AVI)     += snow-ll
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, SVQ1,          MOV)     += svq1
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, WMV1,          AVI)     += wmv1
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, WMV2,          AVI)     += wmv2
-FATE_SEEK_VSYNTH_LENA-$(call ENCDEC, RAWVIDEO,      AVI)     += yuv
+FATE_SEEK_VSYNTH_LENA += asv1 asv2                      \
+                         dnxhd-720p dnxhd-720p-rd       \
+                         dnxhd-1080i dnxhd-4k-hr-lb     \
+                         dv dv-411 dv-50                \
+                         ffv1                           \
+                         flashsv                        \
+                         flv                            \
+                         h261 h263 h263p                \
+                         huffyuv                        \
+                         jpegls ljpeg mjpeg             \
+                         mpeg1 mpeg1b                   \
+                         mpeg2-422    mpeg2-idct-int    \
+                         mpeg2-ilace  mpeg2-ivlc-qprd   \
+                         mpeg2-thread mpeg2-thread-ivlc \
+                         mpeg4 $(FATE_MPEG4_AVI)        \
+                         msmpeg4 msmpeg4v2              \
+                         rgb                            \
+                         roqvideo                       \
+                         rv10 rv20                      \
+                         snow snow-ll                   \
+                         svq1                           \
+                         wmv1 wmv2                      \
+                         yuv                            \
 
 fate-seek-vsynth_lena-asv1:              SRC = fate/vsynth_lena-asv1.avi
 fate-seek-vsynth_lena-asv2:              SRC = fate/vsynth_lena-asv2.avi
@@ -158,78 +122,59 @@  fate-seek-vsynth_lena-wmv1:              SRC = fate/vsynth_lena-wmv1.avi
 fate-seek-vsynth_lena-wmv2:              SRC = fate/vsynth_lena-wmv2.avi
 fate-seek-vsynth_lena-yuv:               SRC = fate/vsynth_lena-yuv.avi
 
-FATE_SAMPLES_SEEK += $(FATE_SEEK_VSYNTH_LENA-yes:%=fate-seek-vsynth_lena-%)
+FATE_SEEK_VSYNTH_LENA := $(FATE_SEEK_VSYNTH_LENA:%=fate-seek-vsynth_lena-%)
+FATE_SEEK_VSYNTH_LENA := $(filter $(subst fate-,fate-seek-,$(FATE_VSYNTH_LENA)), $(FATE_SEEK_VSYNTH_LENA))
+FATE_SAMPLES_SEEK += $(FATE_SEEK_VSYNTH_LENA)
 
 # files from fate-lavf-audio
 
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_S16BE,       AIFF)        += aiff
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_ALAW,        PCM_ALAW)    += al
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_S16BE,       AU)          += au
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  ADPCM_YAMAHA,    MMF)         += mmf
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_MULAW,       PCM_MULAW)   += ul
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  FLAC,            OGG)         += ogg
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_U8,          VOC)         += voc
-FATE_SEEK_LAVF_AUDIO-$(call ENCDEC,  PCM_S16LE,       WAV)         += wav
+FATE_SEEK_LAVF_AUDIO += aiff al au mmf ogg ul voc wav
 
-FATE_SEEK_LAVF_AUDIO := $(FATE_SEEK_LAVF_AUDIO-yes:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_AUDIO := $(FATE_SEEK_LAVF_AUDIO:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_AUDIO := $(filter $(subst fate-,fate-seek-,$(FATE_LAVF_AUDIO)), $(FATE_SEEK_LAVF_AUDIO))
 FATE_SEEK += $(FATE_SEEK_LAVF_AUDIO)
 
 # files from fate-lavf-container
 
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MSMPEG4V3, MP2, ASF)         += asf
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG4,  MP2, AVI)         += avi
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, DVVIDEO,    PCM_S16LE, AVI)         += dv
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC,  FLV,         FLV)         += flv
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, GXF)         += gxf
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG4,      MP2,       MATROSKA)    += mkv
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG4,      PCM_ALAW,  MOV)         += mov
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG1VIDEO, MP2,       MPEG1SYSTEM MPEGPS) += mpg
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF)         += mxf
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG2VIDEO, PCM_S16LE, MXF_D10 MXF) += mxf_d10
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, DVVIDEO,    PCM_S16LE, MXF)         += mxf_dv25
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, DVVIDEO,    PCM_S16LE, MXF)         += mxf_dvcpro50
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, DNXHD,      PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, DNXHD,      PCM_S16LE, MXF_OPATOM MXF) += mxf_opatom_audio
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG4,      MP2,       NUT)         += nut
-FATE_SEEK_LAVF_CONTAINER-$(call ENCMUX,  RV10 AC3_FIXED,        RM)          += rm
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC,  FLV,                   SWF)         += swf
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC2, MPEG2VIDEO, MP2,       MPEGTS)      += ts
-FATE_SEEK_LAVF_CONTAINER-$(call ENCDEC,  MP2,                   WTV)         += wtv
-
-FATE_SEEK_LAVF_CONTAINER := $(FATE_SEEK_LAVF_CONTAINER-yes:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_CONTAINER += asf avi dv flv gxf mkv mov mpg    \
+                            mxf mxf_d10 mxf_dv25 mxf_dvcpro50 \
+                            mxf_opatom mxf_opatom_audio       \
+                            nut swf ts wtv
+# rm is special: fate-lavf-rm does not read the created file
+# and therefore does not require the corresponding demuxer
+# to be present, so we have to explicitly check for this here.
+FATE_SEEK_LAVF_CONTAINER-$(CONFIG_RM_DEMUXER) += rm
+FATE_SEEK_LAVF_CONTAINER += $(FATE_SEEK_LAVF_CONTAINER-yes)
+
+FATE_SEEK_LAVF_CONTAINER := $(FATE_SEEK_LAVF_CONTAINER:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_CONTAINER := $(filter $(subst fate-,fate-seek-,$(FATE_LAVF_CONTAINER)), $(FATE_SEEK_LAVF_CONTAINER))
 FATE_SEEK += $(FATE_SEEK_LAVF_CONTAINER)
 
 # files from fate-lavf-video
 
-FATE_SEEK_LAVF_VIDEO-$(call ENCDEC,  GIF, IMAGE2)      += gif
-FATE_SEEK_LAVF_VIDEO-$(CONFIG_YUV4MPEGPIPE_MUXER)      += y4m
+FATE_SEEK_LAVF_VIDEO += gif y4m
 
-FATE_SEEK_LAVF_VIDEO := $(FATE_SEEK_LAVF_VIDEO-yes:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_VIDEO := $(FATE_SEEK_LAVF_VIDEO:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_VIDEO := $(filter $(subst fate-,fate-seek-,$(FATE_LAVF_VIDEO)), $(FATE_SEEK_LAVF_VIDEO))
 FATE_SEEK += $(FATE_SEEK_LAVF_VIDEO)
+
 $(FATE_SEEK_LAVF_AUDIO) $(FATE_SEEK_LAVF_CONTAINER) $(FATE_SEEK_LAVF_VIDEO): SRC = lavf/lavf.$(@:fate-seek-lavf-%=%)
 
 # files from fate-lavf-image
 
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  BMP,      IMAGE2)      += bmp
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  MJPEG,    IMAGE2)      += jpg
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  PCX,      IMAGE2)      += pcx
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  PGM,      IMAGE2)      += pgm
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  PPM,      IMAGE2)      += ppm
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  SGI,      IMAGE2)      += sgi
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  TARGA,    IMAGE2)      += tga
-FATE_SEEK_LAVF_IMAGE-$(call ENCDEC,  TIFF,     IMAGE2)      += tiff
+FATE_SEEK_LAVF_IMAGE += bmp jpg pcx pgm ppm sgi tga tiff
 
-FATE_SEEK_LAVF_IMAGE := $(FATE_SEEK_LAVF_IMAGE-yes:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_IMAGE := $(FATE_SEEK_LAVF_IMAGE:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_IMAGE := $(filter $(subst fate-,fate-seek-,$(FATE_LAVF_IMAGES)), $(FATE_SEEK_LAVF_IMAGE))
 $(FATE_SEEK_LAVF_IMAGE): SRC = images/$(@:fate-seek-lavf-%=%)/%02d.$(@:fate-seek-lavf-%=%)
 FATE_SEEK += $(FATE_SEEK_LAVF_IMAGE)
 
 #files from fate-lavf-image2pipe
 
-FATE_SEEK_LAVF_IMAGE2PIPE-$(call ENCDEC,  PBM,  IMAGE2PIPE)  += pbmpipe
-FATE_SEEK_LAVF_IMAGE2PIPE-$(call ENCDEC,  PGM,  IMAGE2PIPE)  += pgmpipe
-FATE_SEEK_LAVF_IMAGE2PIPE-$(call ENCDEC,  PPM,  IMAGE2PIPE)  += ppmpipe
+FATE_SEEK_LAVF_IMAGE2PIPE += pbmpipe pgmpipe ppmpipe
 
-FATE_SEEK_LAVF_IMAGE2PIPE := $(FATE_SEEK_LAVF_IMAGE2PIPE-yes:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_IMAGE2PIPE := $(FATE_SEEK_LAVF_IMAGE2PIPE:%=fate-seek-lavf-%)
+FATE_SEEK_LAVF_IMAGE2PIPE := $(filter $(subst fate-,fate-seek-,$(FATE_LAVF_IMAGE2PIPE)), $(FATE_SEEK_LAVF_IMAGE2PIPE))
 $(FATE_SEEK_LAVF_IMAGE2PIPE): SRC = lavf/$(@:fate-seek-lavf-%pipe=%)pipe.$(@:fate-seek-lavf-%pipe=%)
 FATE_SEEK += $(FATE_SEEK_LAVF_IMAGE2PIPE)