[FFmpeg-devel] [PATCH 1/5] tests/fate: Don't keep unnecessary temp files

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Thu Mar 4 15:22:10 EET 2021


Andreas Rheinhardt:
> Some FATE tests use files created by other FATE tests as input files;
> this mostly affects the seek tests which use files from vsynth_lena as
> well as acodec-pcm as input files. In order to make this possible the
> temporary files of all the vsynth* and all acodec-pcm tests are kept.
> Yet only a fraction of these files are actually used. This commit
> changes this to only keep the files that are actually needed for other
> tests. This reduces the size of the tests/data/fate folder after a full
> FATE run from 2024727441B to 138739312B.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  tests/fate/acodec.mak       | 2 +-
>  tests/fate/filter-video.mak | 1 +
>  tests/fate/seek.mak         | 1 +
>  tests/fate/vcodec.mak       | 4 ++--
>  4 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak
> index 35b597859c..1b8c32b163 100644
> --- a/tests/fate/acodec.mak
> +++ b/tests/fate/acodec.mak
> @@ -1,6 +1,6 @@
>  fate-acodec-%: CODEC = $(@:fate-acodec-%=%)
>  fate-acodec-%: SRC = tests/data/asynth-44100-2.wav
> -fate-acodec-%: CMD = enc_dec wav $(SRC) $(FMT) "-b:a 128k -c $(CODEC) $(ENCOPTS)" wav "-c pcm_s16le $(DECOPTS)" -keep
> +fate-acodec-%: CMD = enc_dec wav $(SRC) $(FMT) "-b:a 128k -c $(CODEC) $(ENCOPTS)" wav "-c pcm_s16le $(DECOPTS)" "$(KEEP_OVERRIDE)"
>  fate-acodec-%: CMP_UNIT = 2
>  fate-acodec-%: REF = $(SRC_PATH)/tests/ref/acodec/$(@:fate-acodec-%=%)
>  
> diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
> index 9c7e3489f4..a0d645cc4a 100644
> --- a/tests/fate/filter-video.mak
> +++ b/tests/fate/filter-video.mak
> @@ -564,6 +564,7 @@ fate-filter-pad: CMD = video_filter "pad=iw*1.5:ih*1.5:iw*0.3:ih*0.2"
>  FATE_FILTER_PP = fate-filter-pp fate-filter-pp1 fate-filter-pp2 fate-filter-pp3 fate-filter-pp4 fate-filter-pp5 fate-filter-pp6
>  FATE_FILTER_VSYNTH-$(CONFIG_PP_FILTER) += $(FATE_FILTER_PP)
>  $(FATE_FILTER_PP): fate-vsynth1-mpeg4-qprd
> +fate-vsynth1-mpeg4-qprd: KEEP_OVERRIDE= -keep
>  
>  fate-filter-pp:  CMD = framecrc -flags bitexact -export_side_data venc_params -idct simple -i $(TARGET_PATH)/tests/data/fate/vsynth1-mpeg4-qprd.avi -frames:v 5 -flags +bitexact -vf "pp=be/hb/vb/tn/l5/al"
>  fate-filter-pp1: CMD = video_filter "pp=fq|4/be/hb/vb/tn/l5/al"
> diff --git a/tests/fate/seek.mak b/tests/fate/seek.mak
> index 98d2b54674..5efec32702 100644
> --- a/tests/fate/seek.mak
> +++ b/tests/fate/seek.mak
> @@ -270,6 +270,7 @@ FATE_SEEK_EXTRA += $(FATE_SEEK_EXTRA-yes)
>  $(FATE_SEEK) $(FATE_SAMPLES_SEEK) $(FATE_SEEK_EXTRA): libavformat/tests/seek$(EXESUF)
>  $(FATE_SEEK) $(FATE_SAMPLES_SEEK): CMD = run libavformat/tests/seek$(EXESUF) $(TARGET_PATH)/tests/data/$(SRC)
>  $(FATE_SEEK) $(FATE_SAMPLES_SEEK): fate-seek-%: fate-%
> +$(subst fate-seek-,fate-,$(FATE_SAMPLES_SEEK) $(FATE_SEEK)): KEEP_OVERRIDE = -keep
>  fate-seek-%: REF = $(SRC_PATH)/tests/ref/seek/$(@:fate-seek-%=%)
>  
>  FATE_AVCONV += $(FATE_SEEK)
> diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak
> index 1e9c0d5647..ef892366eb 100644
> --- a/tests/fate/vcodec.mak
> +++ b/tests/fate/vcodec.mak
> @@ -4,8 +4,8 @@ fate-vsynth_lena-%: SRC = tests/data/vsynth_lena.yuv
>  fate-vsynth3-%: SRC = tests/data/vsynth3.yuv
>  fate-vsynth%: CODEC = $(word 3, $(subst -, ,$(@)))
>  fate-vsynth%: FMT = avi
> -fate-vsynth%: CMD = enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 $(DECOPTS)" -keep "$(DECINOPTS)"
> -fate-vsynth3-%: CMD = enc_dec "rawvideo -s $(FATEW)x$(FATEH) -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s $(FATEW)x$(FATEH) -pix_fmt yuv420p -vsync 0 $(DECOPTS)" -keep "$(DECINOPTS)"
> +fate-vsynth%: CMD = enc_dec "rawvideo -s 352x288 -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s 352x288 -pix_fmt yuv420p -vsync 0 $(DECOPTS)" "$(KEEP_OVERRIDE)" "$(DECINOPTS)"
> +fate-vsynth3-%: CMD = enc_dec "rawvideo -s $(FATEW)x$(FATEH) -pix_fmt yuv420p $(RAWDECOPTS)" $(SRC) $(FMT) "-c $(CODEC) $(ENCOPTS)" rawvideo "-s $(FATEW)x$(FATEH) -pix_fmt yuv420p -vsync 0 $(DECOPTS)" "" "$(DECINOPTS)"
>  fate-vsynth%: CMP_UNIT = 1
>  fate-vsynth%: REF = $(SRC_PATH)/tests/ref/vsynth/$(@:fate-%=%)
>  
> 
Will apply this patch tomorrow unless there are objections.

- Andreas


More information about the ffmpeg-devel mailing list