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