matroskaenc: base DefaultDuration on the framerate, not the codec timebase
[libav.git] / tests / Makefile
CommitLineData
7263cd55
MR
1VREF = tests/vsynth1/00.pgm
2AREF = tests/data/asynth1.sw
698a183e 3
4a27a52a 4OBJDIRS += tests/data tests/vsynth1 tests/data/filtergraphs
e9ba6b37 5
3eec1d41 6$(VREF): tests/videogen$(HOSTEXESUF) | tests/vsynth1
698a183e
MR
7 $(M)./$< 'tests/vsynth1/'
8
3eec1d41 9$(AREF): tests/audiogen$(HOSTEXESUF) | tests/data
698a183e
MR
10 $(M)./$< $@
11
870165e2
JR
12tests/data/asynth-%.wav: tests/audiogen$(HOSTEXESUF) | tests/data
13 $(M)./$< $@ $(subst -, ,$*)
14
7263cd55 15tests/data/vsynth1.yuv: tests/videogen$(HOSTEXESUF) | tests/data
d0e9415d 16 $(M)$< $@
7263cd55
MR
17
18tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data
d0e9415d 19 $(M)$< $(SRC_PATH)/tests/lena.pnm $@
7263cd55
MR
20
21tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN
22
4a27a52a
MS
23tests/data/filtergraphs/%: TAG = COPY
24tests/data/filtergraphs/%: $(SRC_PATH)/tests/filtergraphs/% | tests/data/filtergraphs
25 $(M)cp $< $@
26
37063714
DB
27# Check sanity of dependencies when running FATE tests.
28ifneq (,$(filter check fate%,$(filter-out fate-rsync,$(MAKECMDGOALS))))
a1f6ad69 29CHKCFG = $(if $($(1))$(!$(1)),$($(1)), $(error No such config: $(1)))
37063714 30endif
a1f6ad69 31
21fed588
MR
32ALLYES = $(strip $(call XYES, $(1)))
33XYES = $(if $(strip $(1)), \
a1f6ad69 34 $(if $(call CHKCFG,CONFIG_$(firstword $(1))), \
21fed588
MR
35 $(call XYES, $(wordlist 2, $(words $(1)), $(1)))), \
36 yes)
37
38ENCDEC = $(call ALLYES, $(firstword $(1))_ENCODER $(lastword $(1))_DECODER \
39 $(firstword $(2))_MUXER $(lastword $(2))_DEMUXER)
40
41ENCDEC2 = $(call ALLYES, $(firstword $(1))_ENCODER $(lastword $(1))_DECODER \
42 $(firstword $(2))_ENCODER $(lastword $(2))_DECODER \
43 $(firstword $(3))_MUXER $(lastword $(3))_DEMUXER)
44
c0329748 45DEMDEC = $(call ALLYES, $(1)_DEMUXER $(2:%=%_DECODER))
6f9018fc 46ENCMUX = $(call ALLYES, $(1:%=%_ENCODER) $(2)_MUXER)
c0329748 47
01656fd4
AK
48DEMMUX = $(call ALLYES, $(1)_DEMUXER $(2)_MUXER)
49
a8cc88b1
AK
50FILTERDEMDEC = $(call ALLYES, $(1:%=%_FILTER) $(2)_DEMUXER $(3)_DECODER)
51FILTERDEMDECMUX = $(call ALLYES, $(1:%=%_FILTER) $(2)_DEMUXER $(3)_DECODER $(4)_MUXER)
52FILTERDEMDECENCMUX = $(call ALLYES, $(1:%=%_FILTER) $(2)_DEMUXER $(3)_DECODER $(4)_ENCODER $(5)_MUXER)
b357f1d1 53
eddff165
VG
54PARSERDEMDEC = $(call ALLYES, $(1)_PARSER $(2)_DEMUXER $(3)_DECODER)
55
7263cd55
MR
56include $(SRC_PATH)/tests/fate/acodec.mak
57include $(SRC_PATH)/tests/fate/vcodec.mak
fa263350 58include $(SRC_PATH)/tests/fate/avformat.mak
36ac9a16 59include $(SRC_PATH)/tests/fate/seek.mak
698a183e 60
f038cf3c 61include $(SRC_PATH)/tests/fate/aac.mak
bf692357 62include $(SRC_PATH)/tests/fate/ac3.mak
2df5f59a 63include $(SRC_PATH)/tests/fate/adpcm.mak
e9812159 64include $(SRC_PATH)/tests/fate/alac.mak
f038cf3c 65include $(SRC_PATH)/tests/fate/als.mak
0291ce84
MR
66include $(SRC_PATH)/tests/fate/amrnb.mak
67include $(SRC_PATH)/tests/fate/amrwb.mak
44b7e1b9 68include $(SRC_PATH)/tests/fate/atrac.mak
ab2d11f7 69include $(SRC_PATH)/tests/fate/audio.mak
7756859a 70include $(SRC_PATH)/tests/fate/bmp.mak
159a2436 71include $(SRC_PATH)/tests/fate/cdxl.mak
bf2a7f91 72include $(SRC_PATH)/tests/fate/cover-art.mak
c7cb1730 73include $(SRC_PATH)/tests/fate/demux.mak
febd0222 74include $(SRC_PATH)/tests/fate/dfa.mak
209c4452 75include $(SRC_PATH)/tests/fate/dpcm.mak
394f0b18 76include $(SRC_PATH)/tests/fate/ea.mak
b357f1d1 77include $(SRC_PATH)/tests/fate/filter-audio.mak
a77aed14 78include $(SRC_PATH)/tests/fate/filter-video.mak
983fa8bc 79include $(SRC_PATH)/tests/fate/flac.mak
f038cf3c
MR
80include $(SRC_PATH)/tests/fate/fft.mak
81include $(SRC_PATH)/tests/fate/h264.mak
e1c058db 82include $(SRC_PATH)/tests/fate/hevc.mak
d69a03ef 83include $(SRC_PATH)/tests/fate/image.mak
6146d78d 84include $(SRC_PATH)/tests/fate/indeo.mak
913b6b4b 85include $(SRC_PATH)/tests/fate/libavcodec.mak
c47037c7 86include $(SRC_PATH)/tests/fate/libavdevice.mak
7bc433b3 87include $(SRC_PATH)/tests/fate/libavformat.mak
9ab5f710 88include $(SRC_PATH)/tests/fate/libavresample.mak
03256d96 89include $(SRC_PATH)/tests/fate/libavutil.mak
86027674
DB
90include $(SRC_PATH)/tests/fate/lossless-audio.mak
91include $(SRC_PATH)/tests/fate/lossless-video.mak
4e616d09 92include $(SRC_PATH)/tests/fate/microsoft.mak
e9e5a1bd 93include $(SRC_PATH)/tests/fate/monkeysaudio.mak
f038cf3c 94include $(SRC_PATH)/tests/fate/mp3.mak
9e5bd6cc 95include $(SRC_PATH)/tests/fate/mpc.mak
b70d7a4a 96include $(SRC_PATH)/tests/fate/opus.mak
bdda1616 97include $(SRC_PATH)/tests/fate/pcm.mak
4bfa67bd 98include $(SRC_PATH)/tests/fate/probe.mak
a62d3669 99include $(SRC_PATH)/tests/fate/prores.mak
f6ba1f26 100include $(SRC_PATH)/tests/fate/qt.mak
f8c47cb8 101include $(SRC_PATH)/tests/fate/qtrle.mak
bad38179 102include $(SRC_PATH)/tests/fate/real.mak
753a5063 103include $(SRC_PATH)/tests/fate/screen.mak
42de665d 104include $(SRC_PATH)/tests/fate/utvideo.mak
628637f6 105include $(SRC_PATH)/tests/fate/video.mak
51150cf0 106include $(SRC_PATH)/tests/fate/voice.mak
f038cf3c 107include $(SRC_PATH)/tests/fate/vorbis.mak
bebf9f92 108include $(SRC_PATH)/tests/fate/vpx.mak
723c35fe 109include $(SRC_PATH)/tests/fate/vqf.mak
273f4b39 110include $(SRC_PATH)/tests/fate/wavpack.mak
b998aec4 111include $(SRC_PATH)/tests/fate/wma.mak
04ffd220 112include $(SRC_PATH)/tests/fate/xvid.mak
698a183e 113
f7c2dca0 114FATE_AVCONV += $(FATE_AVCONV-yes)
63dcd16d 115FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV)
f7c2dca0 116
eccd0671 117FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_AVCONV-yes)
63dcd16d
MR
118FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV)
119FATE_SAMPLES += $(FATE_SAMPLES-yes)
120
908f12f3 121FATE += $(FATE-yes)
f7c2dca0 122
63dcd16d 123$(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
908f12f3 124
698a183e 125ifdef SAMPLES
63dcd16d 126FATE += $(FATE_SAMPLES)
698a183e
MR
127fate-rsync:
128 rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
129else
130fate-rsync:
131 @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
63dcd16d
MR
132$(FATE_SAMPLES):
133 @echo "$@ requires external samples and SAMPLES not specified"; false
698a183e
MR
134endif
135
136FATE_UTILS = base64 tiny_psnr
137
138fate: $(FATE)
139
f7c2dca0 140$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
698a183e 141 @echo "TEST $(@:fate-%=%)"
b01b60a2 142 $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)' '$(CPUFLAGS)' '$(CMP_SHIFT)' '$(CMP_TARGET)' '$(SIZE_TOLERANCE)' '$(CMP_UNIT)' '$(GEN)'
698a183e
MR
143
144fate-list:
145 @printf '%s\n' $(sort $(FATE))
146
a862c7d3
RT
147coverage.info: TAG = LCOV
148coverage.info:
95e8ac60
RT
149 $(M)lcov -q -d $(CURDIR) -b $(SRC_PATH) --capture | \
150 sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@
151 $(M)lcov -q --remove $@ "/usr/include*" -o $@
a862c7d3
RT
152
153lcov: TAG = GENHTML
154lcov: coverage.info
768e44d0 155 $(M)genhtml -q -o $(CURDIR)/lcov $<
a862c7d3
RT
156
157lcov-reset: TAG = LCOV
158lcov-reset:
159 $(M)lcov -d $(CURDIR) --zerocounters
160 $(Q)$(RM) -f coverage.info
161
698a183e
MR
162clean:: testclean
163
164testclean:
a4880283 165 $(RM) -r tests/vsynth1 tests/data
deb3ed01 166 $(RM) $(CLEANSUFFIXES:%=tests/%)
698a183e
MR
167 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
168
169-include $(wildcard tests/*.d)
170
a862c7d3
RT
171.PHONY: fate* lcov lcov-reset
172.INTERMEDIATE: coverage.info