build: Silence the lcov-reset target
[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
159a2436 75include $(SRC_PATH)/tests/fate/cdxl.mak
c9f8cfb6 76include $(SRC_PATH)/tests/fate/checkasm.mak
bf2a7f91 77include $(SRC_PATH)/tests/fate/cover-art.mak
c7cb1730 78include $(SRC_PATH)/tests/fate/demux.mak
febd0222 79include $(SRC_PATH)/tests/fate/dfa.mak
209c4452 80include $(SRC_PATH)/tests/fate/dpcm.mak
394f0b18 81include $(SRC_PATH)/tests/fate/ea.mak
01621202 82include $(SRC_PATH)/tests/fate/fft.mak
b357f1d1 83include $(SRC_PATH)/tests/fate/filter-audio.mak
a77aed14 84include $(SRC_PATH)/tests/fate/filter-video.mak
983fa8bc 85include $(SRC_PATH)/tests/fate/flac.mak
f038cf3c 86include $(SRC_PATH)/tests/fate/h264.mak
e1c058db 87include $(SRC_PATH)/tests/fate/hevc.mak
d69a03ef 88include $(SRC_PATH)/tests/fate/image.mak
6146d78d 89include $(SRC_PATH)/tests/fate/indeo.mak
913b6b4b 90include $(SRC_PATH)/tests/fate/libavcodec.mak
c47037c7 91include $(SRC_PATH)/tests/fate/libavdevice.mak
7bc433b3 92include $(SRC_PATH)/tests/fate/libavformat.mak
9ab5f710 93include $(SRC_PATH)/tests/fate/libavresample.mak
03256d96 94include $(SRC_PATH)/tests/fate/libavutil.mak
86027674
DB
95include $(SRC_PATH)/tests/fate/lossless-audio.mak
96include $(SRC_PATH)/tests/fate/lossless-video.mak
4e616d09 97include $(SRC_PATH)/tests/fate/microsoft.mak
e9e5a1bd 98include $(SRC_PATH)/tests/fate/monkeysaudio.mak
f038cf3c 99include $(SRC_PATH)/tests/fate/mp3.mak
9e5bd6cc 100include $(SRC_PATH)/tests/fate/mpc.mak
f29c226a 101include $(SRC_PATH)/tests/fate/mpeg4.mak
b70d7a4a 102include $(SRC_PATH)/tests/fate/opus.mak
bdda1616 103include $(SRC_PATH)/tests/fate/pcm.mak
4bfa67bd 104include $(SRC_PATH)/tests/fate/probe.mak
a62d3669 105include $(SRC_PATH)/tests/fate/prores.mak
f6ba1f26 106include $(SRC_PATH)/tests/fate/qt.mak
f8c47cb8 107include $(SRC_PATH)/tests/fate/qtrle.mak
bad38179 108include $(SRC_PATH)/tests/fate/real.mak
753a5063 109include $(SRC_PATH)/tests/fate/screen.mak
42de665d 110include $(SRC_PATH)/tests/fate/utvideo.mak
628637f6 111include $(SRC_PATH)/tests/fate/video.mak
51150cf0 112include $(SRC_PATH)/tests/fate/voice.mak
f038cf3c 113include $(SRC_PATH)/tests/fate/vorbis.mak
bebf9f92 114include $(SRC_PATH)/tests/fate/vpx.mak
723c35fe 115include $(SRC_PATH)/tests/fate/vqf.mak
273f4b39 116include $(SRC_PATH)/tests/fate/wavpack.mak
b998aec4 117include $(SRC_PATH)/tests/fate/wma.mak
04ffd220 118include $(SRC_PATH)/tests/fate/xvid.mak
698a183e 119
f7c2dca0 120FATE_AVCONV += $(FATE_AVCONV-yes)
63dcd16d 121FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV)
f7c2dca0 122
eccd0671 123FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_AVCONV-yes)
63dcd16d
MR
124FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV)
125FATE_SAMPLES += $(FATE_SAMPLES-yes)
126
908f12f3 127FATE += $(FATE-yes)
f7c2dca0 128
63dcd16d 129$(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
908f12f3 130
698a183e 131ifdef SAMPLES
63dcd16d 132FATE += $(FATE_SAMPLES)
698a183e
MR
133fate-rsync:
134 rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
135else
136fate-rsync:
137 @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
63dcd16d
MR
138$(FATE_SAMPLES):
139 @echo "$@ requires external samples and SAMPLES not specified"; false
698a183e
MR
140endif
141
142FATE_UTILS = base64 tiny_psnr
143
144fate: $(FATE)
145
f7c2dca0 146$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
698a183e 147 @echo "TEST $(@:fate-%=%)"
96a06dba 148 $(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)'
698a183e
MR
149
150fate-list:
151 @printf '%s\n' $(sort $(FATE))
152
a862c7d3
RT
153coverage.info: TAG = LCOV
154coverage.info:
95e8ac60
RT
155 $(M)lcov -q -d $(CURDIR) -b $(SRC_PATH) --capture | \
156 sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@
157 $(M)lcov -q --remove $@ "/usr/include*" -o $@
a862c7d3
RT
158
159lcov: TAG = GENHTML
160lcov: coverage.info
768e44d0 161 $(M)genhtml -q -o $(CURDIR)/lcov $<
a862c7d3
RT
162
163lcov-reset: TAG = LCOV
164lcov-reset:
a08b5d7b 165 $(M)lcov -q -d $(CURDIR) --zerocounters
a862c7d3
RT
166 $(Q)$(RM) -f coverage.info
167
698a183e
MR
168clean:: testclean
169
170testclean:
a4880283 171 $(RM) -r tests/vsynth1 tests/data
deb3ed01 172 $(RM) $(CLEANSUFFIXES:%=tests/%)
698a183e 173 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
706208ef 174 $(RM) tests/pixfmts.mak
698a183e
MR
175
176-include $(wildcard tests/*.d)
177
8bc67ec2
HG
178include $(SRC_PATH)/tests/checkasm/Makefile
179
a862c7d3
RT
180.PHONY: fate* lcov lcov-reset
181.INTERMEDIATE: coverage.info