2 ifneq ($(strip $(KEEP
)),)
3 ifneq ($(strip $(KEEP
)),0)
4 # KEEP_FILES is normally undefined; it is set to 2 # if the user requested
5 # to keep all intermediate FATE-files by setting KEEP.
6 # For some tests it is also set to 1 if it is unset; this indicates
7 # that only some intermediate files (namely only non-raw files)
8 # are to be kept. This allows reusing these intermediate files as input
9 # files for other tests (mostly the seek-tests).
15 VREF
= tests
/vsynth1
/00.pgm
16 AREF
= tests
/data
/asynth1.sw
21 FFMPEG
=ffmpeg
$(PROGSSUF
)$(EXESUF
)
25 APITESTSDIR
:= tests
/api
26 FATE_OUTDIRS
= tests
/data tests
/data
/fate tests
/data
/filtergraphs tests
/data
/maps tests
/data
/streamgroups tests
/data
/lavf tests
/data
/lavf-fate tests
/data
/pixfmt tests
/vsynth1
$(APITESTSDIR
)
27 OUTDIRS
+= $(FATE_OUTDIRS
)
29 $(VREF
): tests
/videogen
$(HOSTEXESUF
) | tests
/vsynth1
30 $(M
).
/$< 'tests/vsynth1/'
32 $(AREF
): tests
/audiogen
$(HOSTEXESUF
) | tests
/data
35 tests
/data
/asynth-
%.wav
: tests
/audiogen
$(HOSTEXESUF
) | tests
/data
36 $(M
).
/$< $@
$(subst -, ,$*)
38 tests
/data
/vsynth1.yuv
: tests
/videogen
$(HOSTEXESUF
) | tests
/data
41 tests
/data
/vsynth2.yuv
: tests
/rotozoom
$(HOSTEXESUF
) | tests
/data
42 $(M
)$< $(SRC_PATH
)/tests
/reference.pnm
$@
44 tests
/data
/vsynth_lena.yuv
: tests
/rotozoom
$(HOSTEXESUF
) | tests
/data
45 $(M
)$< $(SAMPLES
)/lena.pnm
$@
47 tests
/data
/vsynth3.yuv
: tests
/videogen
$(HOSTEXESUF
) | tests
/data
48 $(M
)$< $@
$(FATEW
) $(FATEH
)
50 tests
/test_copy.ffmeta
: TAG
= COPY
51 tests
/test_copy.ffmeta
: tests
/data
52 $(M
)cp
-f
$(SRC_PATH
)/tests
/test.ffmeta tests
/test_copy.ffmeta
54 tests
/data
/%.sw tests
/data
/asynth
% tests
/data
/vsynth
%.yuv tests
/vsynth
%/00.pgm tests
/data
/%.nut
: TAG
= GEN
56 tests
/data
/filtergraphs
/%: TAG
= COPY
57 tests
/data
/filtergraphs
/%: $(SRC_PATH
)/tests
/filtergraphs
/% | tests
/data
/filtergraphs
60 tests
/data
/maps
/%: TAG
= COPY
61 tests
/data
/maps
/%: $(SRC_PATH
)/tests
/maps
/% | tests
/data
/maps
64 tests
/data
/streamgroups
/%: TAG
= COPY
65 tests
/data
/streamgroups
/%: $(SRC_PATH
)/tests
/streamgroups
/% | tests
/data
/streamgroups
68 RUNNING_FATE
:= $(filter check fate
%,$(filter-out fate-rsync
,$(MAKECMDGOALS
)))
70 # Check sanity of dependencies when running FATE tests.
71 ifneq (,$(RUNNING_FATE
))
72 CHKCFG
= $(if
$($(1))$(!$(1)),$($(1)), $(error No such config
: $(1)))
75 ALLYES
= $(strip $(call XYES
, $(1)))
76 XYES
= $(if
$(strip $(1)), \
77 $(if
$(call CHKCFG
,CONFIG_
$(firstword $(1))), \
78 $(call XYES
, $(wordlist
2, $(words $(1)), $(1)))), \
81 ENCDEC
= $(call ALLYES
, $(firstword $(1))_ENCODER
$(lastword
$(1))_DECODER \
82 $(firstword $(2))_MUXER
$(lastword
$(2))_DEMUXER \
85 ENCDEC2
= $(call ALLYES
, $(firstword $(1))_ENCODER
$(lastword
$(1))_DECODER \
86 $(firstword $(2))_ENCODER
$(lastword
$(2))_DECODER \
87 $(firstword $(3))_MUXER
$(lastword
$(3))_DEMUXER \
90 # RAWVIDEO_ENCODER and PCM_S16LE_ENCODER corresponds to the default codecs
91 # for framecrc. These requirements are not always necessary.
92 TRANSCODE
= $(call ALLYES
, $(firstword $(1))_ENCODER
$(lastword
$(1))_DECODER \
93 $(firstword $(2))_MUXER
$(lastword
$(2))_DEMUXER \
94 $(3) FILE_PROTOCOL PIPE_PROTOCOL RAWVIDEO_ENCODER \
95 PCM_S16LE_ENCODER FRAMECRC_MUXER
)
97 REMUX
= $(call ALLYES
, $(firstword $(1))_MUXER
$(lastword
$(1))_DEMUXER \
98 $(2) FILE_PROTOCOL PIPE_PROTOCOL FRAMECRC_MUXER
)
100 DEMDEC
= $(call ALLYES
, $(1)_DEMUXER
$(2:%=%_DECODER
) $(3) FILE_PROTOCOL
)
101 ENCMUX
= $(call ALLYES
, $(1:%=%_ENCODER
) $(2)_MUXER
$(3))
103 FRAMEMD5
= $(call ALLYES
, $(1)_DEMUXER
$(2:%=%_DECODER
) $(3) \
104 PCM_S16LE_ENCODER RAWVIDEO_ENCODER FRAMEMD5_MUXER \
105 PIPE_PROTOCOL FILE_PROTOCOL
)
106 FRAMECRC
= $(call ALLYES
, $(1)_DEMUXER
$(2:%=%_DECODER
) $(3) \
107 PCM_S16LE_ENCODER RAWVIDEO_ENCODER FRAMECRC_MUXER \
108 PIPE_PROTOCOL FILE_PROTOCOL
)
110 # Variant of DEMDEC for use with the "pcm" command.
111 PCM
= $(call ALLYES
, $(1)_DEMUXER
$(2)_DECODER
$(3) FILE_PROTOCOL \
112 PCM_S16LE_ENCODER PCM_S16LE_MUXER PIPE_PROTOCOL
)
114 DEMMUX
= $(call ALLYES
, $(1)_DEMUXER
$(2)_MUXER
$(3) FILE_PROTOCOL
)
116 # Variant of FRAMECRC for the cases with -lavfi where no demuxer is involved.
117 FILTERFRAMECRC
= $(call ALLYES
, $(1:%=%_FILTER
) $(2) PCM_S16LE_ENCODER \
118 RAWVIDEO_ENCODER FRAMECRC_MUXER PIPE_PROTOCOL
)
119 # Specialization of FRAMECRC to be used when filtering is involved.
120 FILTERDEMDEC
= $(call ALLYES
, $(1:%=%_FILTER
) $(2:%=%_DEMUXER
) $(3:%=%_DECODER
) \
121 $(4) PCM_S16LE_ENCODER RAWVIDEO_ENCODER \
122 FRAMECRC_MUXER FILE_PROTOCOL PIPE_PROTOCOL
)
123 FILTERDEMDECENCMUX
= $(call ALLYES
, $(1:%=%_FILTER
) $(2)_DEMUXER
$(3)_DECODER
$(4)_ENCODER
$(5)_MUXER
$(6) FILE_PROTOCOL
)
125 PARSERDEMDEC
= $(call ALLYES
, $(1)_PARSER
$(2)_DEMUXER
$(3)_DECODER
$(4) FILE_PROTOCOL
)
127 # Allow overriding CONFIG_LARGE_TESTS via LARGE_TESTS, if set on the
129 ifeq ($(LARGE_TESTS
), yes
)
130 CONFIG_LARGE_TESTS
:=yes
131 !CONFIG_LARGE_TESTS
:=
132 else ifeq ($(LARGE_TESTS
), no
)
134 !CONFIG_LARGE_TESTS
:=yes
137 include $(SRC_PATH
)/$(APITESTSDIR
)/Makefile
139 include $(SRC_PATH
)/tests
/fate
/acodec.mak
140 include $(SRC_PATH
)/tests
/fate
/vcodec.mak
142 include $(SRC_PATH
)/tests
/fate
/lavf-audio.mak
143 include $(SRC_PATH
)/tests
/fate
/lavf-container.mak
144 include $(SRC_PATH
)/tests
/fate
/lavf-image.mak
145 include $(SRC_PATH
)/tests
/fate
/lavf-image2pipe.mak
146 include $(SRC_PATH
)/tests
/fate
/lavf-video.mak
147 # Must be included after acodec.mak, vcodec.mak and lavf-*.mak
148 include $(SRC_PATH
)/tests
/fate
/seek.mak
150 include $(SRC_PATH
)/tests
/fate
/aac.mak
151 include $(SRC_PATH
)/tests
/fate
/ac3.mak
152 include $(SRC_PATH
)/tests
/fate
/adpcm.mak
153 include $(SRC_PATH
)/tests
/fate
/alac.mak
154 include $(SRC_PATH
)/tests
/fate
/als.mak
155 include $(SRC_PATH
)/tests
/fate
/amrnb.mak
156 include $(SRC_PATH
)/tests
/fate
/amrwb.mak
157 include $(SRC_PATH
)/tests
/fate
/api.mak
158 include $(SRC_PATH
)/tests
/fate
/apng.mak
159 include $(SRC_PATH
)/tests
/fate
/atrac.mak
160 include $(SRC_PATH
)/tests
/fate
/audio.mak
161 include $(SRC_PATH
)/tests
/fate
/bmp.mak
162 include $(SRC_PATH
)/tests
/fate
/build.mak
163 include $(SRC_PATH
)/tests
/fate
/caf.mak
164 include $(SRC_PATH
)/tests
/fate
/canopus.mak
165 include $(SRC_PATH
)/tests
/fate
/cbs.mak
166 include $(SRC_PATH
)/tests
/fate
/cdxl.mak
167 include $(SRC_PATH
)/tests
/fate
/checkasm.mak
168 # Must be included after lavf-container.mak
169 include $(SRC_PATH
)/tests
/fate
/concatdec.mak
170 include $(SRC_PATH
)/tests
/fate
/cover-art.mak
171 include $(SRC_PATH
)/tests
/fate
/dca.mak
172 include $(SRC_PATH
)/tests
/fate
/demux.mak
173 include $(SRC_PATH
)/tests
/fate
/dfa.mak
174 include $(SRC_PATH
)/tests
/fate
/dnxhd.mak
175 include $(SRC_PATH
)/tests
/fate
/dpcm.mak
176 include $(SRC_PATH
)/tests
/fate
/dvvideo.mak
177 include $(SRC_PATH
)/tests
/fate
/ea.mak
178 include $(SRC_PATH
)/tests
/fate
/exif.mak
179 include $(SRC_PATH
)/tests
/fate
/enc_external.mak
180 # Must be included after lavf-video.mak
181 include $(SRC_PATH
)/tests
/fate
/ffmpeg.mak
182 include $(SRC_PATH
)/tests
/fate
/ffprobe.mak
183 include $(SRC_PATH
)/tests
/fate
/fifo-muxer.mak
184 include $(SRC_PATH
)/tests
/fate
/filter-audio.mak
185 # Must be included after vcodec.mak
186 include $(SRC_PATH
)/tests
/fate
/filter-video.mak
187 include $(SRC_PATH
)/tests
/fate
/fits.mak
188 include $(SRC_PATH
)/tests
/fate
/flac.mak
189 include $(SRC_PATH
)/tests
/fate
/flvenc.mak
190 include $(SRC_PATH
)/tests
/fate
/gapless.mak
191 include $(SRC_PATH
)/tests
/fate
/gif.mak
192 include $(SRC_PATH
)/tests
/fate
/h264.mak
193 include $(SRC_PATH
)/tests
/fate
/hap.mak
194 include $(SRC_PATH
)/tests
/fate
/hevc.mak
195 include $(SRC_PATH
)/tests
/fate
/hlsenc.mak
196 include $(SRC_PATH
)/tests
/fate
/hw.mak
197 include $(SRC_PATH
)/tests
/fate
/iamf.mak
198 include $(SRC_PATH
)/tests
/fate
/id3v2.mak
199 include $(SRC_PATH
)/tests
/fate
/image.mak
200 include $(SRC_PATH
)/tests
/fate
/imf.mak
201 include $(SRC_PATH
)/tests
/fate
/indeo.mak
202 include $(SRC_PATH
)/tests
/fate
/jpeg2000.mak
203 include $(SRC_PATH
)/tests
/fate
/jxl.mak
204 include $(SRC_PATH
)/tests
/fate
/libavcodec.mak
205 include $(SRC_PATH
)/tests
/fate
/libavdevice.mak
206 include $(SRC_PATH
)/tests
/fate
/libavformat.mak
207 include $(SRC_PATH
)/tests
/fate
/libavutil.mak
208 include $(SRC_PATH
)/tests
/fate
/libswresample.mak
209 include $(SRC_PATH
)/tests
/fate
/libswscale.mak
210 include $(SRC_PATH
)/tests
/fate
/lossless-audio.mak
211 include $(SRC_PATH
)/tests
/fate
/lossless-video.mak
212 include $(SRC_PATH
)/tests
/fate
/matroska.mak
213 include $(SRC_PATH
)/tests
/fate
/microsoft.mak
214 include $(SRC_PATH
)/tests
/fate
/monkeysaudio.mak
215 include $(SRC_PATH
)/tests
/fate
/mov.mak
216 include $(SRC_PATH
)/tests
/fate
/mp3.mak
217 include $(SRC_PATH
)/tests
/fate
/mpc.mak
218 include $(SRC_PATH
)/tests
/fate
/mpeg4.mak
219 include $(SRC_PATH
)/tests
/fate
/mpegps.mak
220 include $(SRC_PATH
)/tests
/fate
/mpegts.mak
221 include $(SRC_PATH
)/tests
/fate
/mxf.mak
222 include $(SRC_PATH
)/tests
/fate
/oma.mak
223 include $(SRC_PATH
)/tests
/fate
/opus.mak
224 include $(SRC_PATH
)/tests
/fate
/pcm.mak
225 include $(SRC_PATH
)/tests
/fate
/pixfmt.mak
226 include $(SRC_PATH
)/tests
/fate
/pixlet.mak
227 include $(SRC_PATH
)/tests
/fate
/probe.mak
228 include $(SRC_PATH
)/tests
/fate
/prores.mak
229 include $(SRC_PATH
)/tests
/fate
/qoa.mak
230 include $(SRC_PATH
)/tests
/fate
/qt.mak
231 include $(SRC_PATH
)/tests
/fate
/qtrle.mak
232 include $(SRC_PATH
)/tests
/fate
/real.mak
233 include $(SRC_PATH
)/tests
/fate
/screen.mak
234 include $(SRC_PATH
)/tests
/fate
/segafilm.mak
235 include $(SRC_PATH
)/tests
/fate
/segment.mak
236 include $(SRC_PATH
)/tests
/fate
/source.mak
237 include $(SRC_PATH
)/tests
/fate
/spdif.mak
238 include $(SRC_PATH
)/tests
/fate
/speedhq.mak
239 include $(SRC_PATH
)/tests
/fate
/subtitles.mak
240 include $(SRC_PATH
)/tests
/fate
/truehd.mak
241 include $(SRC_PATH
)/tests
/fate
/utvideo.mak
242 include $(SRC_PATH
)/tests
/fate
/vbn.mak
243 include $(SRC_PATH
)/tests
/fate
/video.mak
244 include $(SRC_PATH
)/tests
/fate
/voice.mak
245 include $(SRC_PATH
)/tests
/fate
/vorbis.mak
246 include $(SRC_PATH
)/tests
/fate
/vpx.mak
247 include $(SRC_PATH
)/tests
/fate
/vqf.mak
248 include $(SRC_PATH
)/tests
/fate
/vvc.mak
249 include $(SRC_PATH
)/tests
/fate
/wavpack.mak
250 include $(SRC_PATH
)/tests
/fate
/webm-dash-manifest.mak
251 include $(SRC_PATH
)/tests
/fate
/wma.mak
252 include $(SRC_PATH
)/tests
/fate
/xvid.mak
254 FATE_FFMPEG
+= $(FATE_FFMPEG-yes
) $(FATE_AVCONV
) $(FATE_AVCONV-yes
)
255 FATE-
$(CONFIG_FFMPEG
) += $(FATE_FFMPEG
)
256 FATE_FFPROBE
+= $(FATE_FFPROBE-yes
)
257 FATE-
$(CONFIG_FFPROBE
) += $(FATE_FFPROBE
)
258 FATE-
$(call ALLYES
, FFMPEG FFPROBE
) += $(FATE_FFMPEG_FFPROBE
)
260 FATE_SAMPLES_AVCONV
+= $(FATE_SAMPLES_AVCONV-yes
)
261 FATE_SAMPLES_FFMPEG
+= $(FATE_SAMPLES_FFMPEG-yes
)
262 FATE_EXTERN-
$(CONFIG_FFMPEG
) += $(FATE_SAMPLES_AVCONV
) $(FATE_SAMPLES_FFMPEG
)
263 FATE_EXTERN-
$(CONFIG_FFPROBE
) += $(FATE_SAMPLES_FFPROBE
)
264 FATE_SAMPLES_FFMPEG_FFPROBE
+= $(FATE_SAMPLES_FFMPEG_FFPROBE-yes
)
265 FATE_EXTERN-
$(call ALLYES
, FFMPEG FFPROBE
) += $(FATE_SAMPLES_FFMPEG_FFPROBE
)
266 FATE_EXTERN
+= $(FATE_EXTERN-yes
) $(FATE_SAMPLES_FASTSTART
)
270 RSYNC_OPTIONS-
$(HAVE_RSYNC_CONTIMEOUT
) += --contimeout
=60
271 RSYNC_OPTIONS
= -vrltLW
--timeout
=60 $(RSYNC_OPTIONS-yes
)
273 $(FATE_FFMPEG
) $(FATE_FFMPEG_FFPROBE
) $(FATE_SAMPLES_AVCONV
) $(FATE_SAMPLES_FFMPEG
) $(FATE_SAMPLES_FFMPEG_FFPROBE
): ffmpeg
$(PROGSSUF
)$(EXESUF
)
275 $(FATE_FFPROBE
) $(FATE_FFMPEG_FFPROBE
) $(FATE_SAMPLES_FFPROBE
) $(FATE_SAMPLES_FFMPEG_FFPROBE
): ffprobe
$(PROGSSUF
)$(EXESUF
)
277 $(FATE_SAMPLES_FASTSTART
): tools
/qt-faststart
$(EXESUF
)
278 $(FATE_SAMPLES_DUMP_DATA
) $(FATE_SAMPLES_DUMP_DATA-yes
): tools
/venc_data_dump
$(EXESUF
)
279 $(FATE_SAMPLES_SCALE_SLICE
): tools
/scale_slice_test
$(EXESUF
)
282 FATE
+= $(FATE_EXTERN
)
284 rsync
$(RSYNC_OPTIONS
) rsync
://fate-suite.ffmpeg.org
/fate-suite
/ $(SAMPLES
)
287 @echo
"warning: only a subset of the fate tests will be run because SAMPLES is not specified"
289 @echo
"use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
291 @echo
"$@ requires external samples and SAMPLES not specified"; false
294 FATE_UTILS
= base64 tiny_psnr tiny_ssim audiomatch
298 $(addprefix fate-
, $(IGNORE_TESTS
)): REPORT
=ignore
302 # Tests requiring hardware support are not included in a default fate run.
303 fate-hw
: $(FATE_HW-yes
)
304 FATE
+= $(FATE_HW-yes
)
306 $(FATE
): export PROGSUF
= $(PROGSSUF
)
307 $(FATE
): export EXECSUF
= $(EXESUF
)
308 $(FATE
): export HOSTEXECSUF
= $(HOSTEXESUF
)
309 $(FATE
): $(FATE_UTILS
:%=tests
/%$(HOSTEXESUF
)) |
$(FATE_OUTDIRS
)
310 @echo
"TEST $(@:fate-%=%)$(FATE_SUFFIX)"
311 $(Q
)$(SRC_PATH
)/tests
/fate-run.sh
$@
$(FATE_SUFFIX
) "$(TARGET_SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)' '$(HWACCEL)' '$(REPORT)' '$(KEEP_FILES)'
314 @printf
'%s\n' $(sort $(FATE
))
317 @
! ls tests
/data
/fate
/*.rep
>/dev
/null
2>&1 || awk
-F
: '$$2 != 0 { print "fate-" $$1 }' tests
/data
/fate
/*.rep
320 @
rm -f tests
/data
/fate
/*.rep
322 coverage.
info: TAG
= LCOV
324 $(M
)lcov
-q
-d
$(CURDIR
) -b
$(patsubst src
%,.
/,$(SRC_LINK
)) --capture | \
325 sed
"s,$(CURDIR)/\./,$(CURDIR)/," > $@.in
326 $(M
)lcov
-q
--remove
$@.in
"/usr*" > $@
331 $(M
)genhtml
-q
-o
$(CURDIR
)/lcov
$<
333 lcov-reset
: TAG
= LCOV
335 $(M
)lcov
-q
-d
$(CURDIR
) --zerocounters
336 $(Q
)$(RM
) -f coverage.
info
341 $(RM
) -r tests
/vsynth1 tests
/data tools
/lavfi-showfiltfmts
$(PROGSSUF
)$(EXESUF
)
342 $(RM
) $(CLEANSUFFIXES
:%=tests
/%)
343 $(RM
) $(TESTTOOLS
:%=tests
/%$(HOSTEXESUF
))
344 $(RM
) tests
/pixfmts.mak tests
/test_copy.ffmeta
346 -include $(wildcard tests
/*.d
)
348 include $(SRC_PATH
)/tests
/checkasm
/Makefile
350 .PHONY
: fate
* lcov lcov-reset
351 .INTERMEDIATE
: coverage.
info