fate: allow tests to specify unit size for psnr comparison
[libav.git] / tests / Makefile
CommitLineData
698a183e
MR
1AREF = fate-acodec-aref
2VREF = fate-vsynth1-vref fate-vsynth2-vref
3REFS = $(AREF) $(VREF)
4
6291d7e4
AK
5$(VREF): avconv$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
6$(AREF): avconv$(EXESUF) tests/data/asynth1.sw
698a183e 7
e9ba6b37
DB
8OBJDIRS += tests/data tests/vsynth1 tests/vsynth2
9
f0ccd53a
DB
10# Required due to missing automatic dependency tracking for HOSTOBJS.
11tests/rotozoom.o tests/videogen.o: tests/utils.c
12
e9ba6b37 13tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
698a183e
MR
14 $(M)./$< 'tests/vsynth1/'
15
e9ba6b37 16tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF) | tests/vsynth2
7e5880e0 17 $(M)./$< $(SRC_PATH)/tests/lena.pnm 'tests/vsynth2/'
698a183e 18
e9ba6b37 19tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
698a183e
MR
20 $(M)./$< $@
21
870165e2
JR
22tests/data/asynth-%.wav: tests/audiogen$(HOSTEXESUF) | tests/data
23 $(M)./$< $@ $(subst -, ,$*)
24
25tests/data/asynth% tests/vsynth%/00.pgm: TAG = GEN
698a183e 26
f038cf3c 27include $(SRC_PATH)/tests/fate/aac.mak
bf692357 28include $(SRC_PATH)/tests/fate/ac3.mak
2df5f59a 29include $(SRC_PATH)/tests/fate/adpcm.mak
f038cf3c 30include $(SRC_PATH)/tests/fate/als.mak
0291ce84
MR
31include $(SRC_PATH)/tests/fate/amrnb.mak
32include $(SRC_PATH)/tests/fate/amrwb.mak
44b7e1b9 33include $(SRC_PATH)/tests/fate/atrac.mak
ab2d11f7 34include $(SRC_PATH)/tests/fate/audio.mak
7756859a 35include $(SRC_PATH)/tests/fate/bmp.mak
159a2436 36include $(SRC_PATH)/tests/fate/cdxl.mak
27e71443 37include $(SRC_PATH)/tests/fate/dct.mak
c7cb1730 38include $(SRC_PATH)/tests/fate/demux.mak
febd0222 39include $(SRC_PATH)/tests/fate/dfa.mak
209c4452 40include $(SRC_PATH)/tests/fate/dpcm.mak
394f0b18 41include $(SRC_PATH)/tests/fate/ea.mak
f038cf3c
MR
42include $(SRC_PATH)/tests/fate/fft.mak
43include $(SRC_PATH)/tests/fate/h264.mak
d69a03ef 44include $(SRC_PATH)/tests/fate/image.mak
6146d78d 45include $(SRC_PATH)/tests/fate/indeo.mak
913b6b4b 46include $(SRC_PATH)/tests/fate/libavcodec.mak
03256d96 47include $(SRC_PATH)/tests/fate/libavutil.mak
86027674
DB
48include $(SRC_PATH)/tests/fate/lossless-audio.mak
49include $(SRC_PATH)/tests/fate/lossless-video.mak
4e616d09 50include $(SRC_PATH)/tests/fate/microsoft.mak
f038cf3c 51include $(SRC_PATH)/tests/fate/mp3.mak
9e5bd6cc 52include $(SRC_PATH)/tests/fate/mpc.mak
bdda1616 53include $(SRC_PATH)/tests/fate/pcm.mak
4bfa67bd 54include $(SRC_PATH)/tests/fate/probe.mak
a62d3669 55include $(SRC_PATH)/tests/fate/prores.mak
f6ba1f26 56include $(SRC_PATH)/tests/fate/qt.mak
f8c47cb8 57include $(SRC_PATH)/tests/fate/qtrle.mak
bad38179 58include $(SRC_PATH)/tests/fate/real.mak
753a5063 59include $(SRC_PATH)/tests/fate/screen.mak
42de665d 60include $(SRC_PATH)/tests/fate/utvideo.mak
628637f6 61include $(SRC_PATH)/tests/fate/video.mak
51150cf0 62include $(SRC_PATH)/tests/fate/voice.mak
f038cf3c 63include $(SRC_PATH)/tests/fate/vorbis.mak
bebf9f92 64include $(SRC_PATH)/tests/fate/vpx.mak
723c35fe 65include $(SRC_PATH)/tests/fate/vqf.mak
273f4b39 66include $(SRC_PATH)/tests/fate/wavpack.mak
b998aec4 67include $(SRC_PATH)/tests/fate/wma.mak
698a183e
MR
68
69FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
70FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
71FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
72FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
73FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
74FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
75FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
76
4852cb37
MR
77FATE_AVCONV += $(FATE_ACODEC) \
78 $(FATE_VCODEC) \
79 $(FATE_LAVF) \
80 $(FATE_LAVFI) \
81 $(FATE_SEEK) \
698a183e 82
f7c2dca0 83FATE_AVCONV += $(FATE_AVCONV-yes)
63dcd16d 84FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV)
f7c2dca0
MR
85
86FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC)
908f12f3 87
63dcd16d
MR
88FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV)
89FATE_SAMPLES += $(FATE_SAMPLES-yes)
90
908f12f3 91FATE += $(FATE-yes)
f7c2dca0
MR
92FATE += $(FATE_LIBAVUTIL)
93
63dcd16d 94$(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
908f12f3 95
698a183e 96$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
b13c6e33
MR
97$(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
98$(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
698a183e
MR
99$(FATE_LAVF): $(REFS)
100$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
191c5f8f 101$(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF)
698a183e
MR
102
103$(FATE_ACODEC): CMD = codectest acodec
104$(FATE_VSYNTH1): CMD = codectest vsynth1
105$(FATE_VSYNTH2): CMD = codectest vsynth2
106$(FATE_LAVF): CMD = lavftest
107$(FATE_LAVFI): CMD = lavfitest
108$(FATE_SEEK): CMD = seektest
109
110fate-codec: fate-acodec fate-vcodec
111fate-acodec: $(FATE_ACODEC)
112fate-vcodec: $(FATE_VCODEC)
113fate-lavf: $(FATE_LAVF)
114fate-lavfi: $(FATE_LAVFI)
115fate-seek: $(FATE_SEEK)
116
117ifdef SAMPLES
63dcd16d 118FATE += $(FATE_SAMPLES)
698a183e
MR
119fate-rsync:
120 rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
121else
122fate-rsync:
123 @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
63dcd16d
MR
124$(FATE_SAMPLES):
125 @echo "$@ requires external samples and SAMPLES not specified"; false
698a183e
MR
126endif
127
128FATE_UTILS = base64 tiny_psnr
129
130fate: $(FATE)
131
f7c2dca0 132$(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
698a183e 133 @echo "TEST $(@:fate-%=%)"
47b5996b 134 $(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)'
698a183e
MR
135
136fate-list:
137 @printf '%s\n' $(sort $(FATE))
138
139clean:: testclean
140
141testclean:
142 $(RM) -r tests/vsynth1 tests/vsynth2 tests/data
deb3ed01 143 $(RM) $(CLEANSUFFIXES:%=tests/%)
698a183e
MR
144 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
145
146-include $(wildcard tests/*.d)
147
bd9a9a2f 148.PHONY: fate*