Add nellymoser "fuzzy" FATE test.
[ffmpeg.git] / tests / Makefile
1 FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
2
3 AREF = fate-acodec-aref
4 VREF = fate-vsynth1-vref fate-vsynth2-vref
5 REFS = $(AREF) $(VREF)
6
7 $(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
8 $(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw tests/data/asynth-16000-1.sw
9 $(AREF): CMP=
10
11 ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
12         @echo
13         @echo "Unfortunately ffserver is broken and therefore its regression"
14         @echo "test fails randomly. Treat the results accordingly."
15         @echo
16         $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
17
18 OBJDIRS += tests/data tests/vsynth1 tests/vsynth2
19
20 tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
21         $(M)./$< 'tests/vsynth1/'
22
23 tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF) | tests/vsynth2
24         $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
25
26 tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
27         $(M)./$< $@
28
29 tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
30         $(M)./$< $@ 16000 1
31
32 tests/data/mapchan-6ch.sw: tests/audiogen$(HOSTEXESUF)
33         @mkdir -p tests/data
34         $(M)./$< $@ 22050 6
35
36 tests/data/mapchan-mono.sw: tests/audiogen$(HOSTEXESUF)
37         @mkdir -p tests/data
38         $(M)./$< $@ 22050 1
39
40 tests/data/%.sw tests/vsynth%/00.pgm: TAG = GEN
41
42 include $(SRC_PATH)/tests/fate/aac.mak
43 include $(SRC_PATH)/tests/fate/ac3.mak
44 include $(SRC_PATH)/tests/fate/adpcm.mak
45 include $(SRC_PATH)/tests/fate/als.mak
46 include $(SRC_PATH)/tests/fate/amrnb.mak
47 include $(SRC_PATH)/tests/fate/amrwb.mak
48 include $(SRC_PATH)/tests/fate/atrac.mak
49 include $(SRC_PATH)/tests/fate/audio.mak
50 include $(SRC_PATH)/tests/fate/bmp.mak
51 include $(SRC_PATH)/tests/fate/cdxl.mak
52 include $(SRC_PATH)/tests/fate/dct.mak
53 include $(SRC_PATH)/tests/fate/demux.mak
54 include $(SRC_PATH)/tests/fate/dfa.mak
55 include $(SRC_PATH)/tests/fate/dpcm.mak
56 include $(SRC_PATH)/tests/fate/ea.mak
57 include $(SRC_PATH)/tests/fate/fft.mak
58 include $(SRC_PATH)/tests/fate/h264.mak
59 include $(SRC_PATH)/tests/fate/image.mak
60 include $(SRC_PATH)/tests/fate/indeo.mak
61 include $(SRC_PATH)/tests/fate/libavcodec.mak
62 include $(SRC_PATH)/tests/fate/libavutil.mak
63 include $(SRC_PATH)/tests/fate/mapchan.mak
64 include $(SRC_PATH)/tests/fate/lossless-audio.mak
65 include $(SRC_PATH)/tests/fate/lossless-video.mak
66 include $(SRC_PATH)/tests/fate/microsoft.mak
67 include $(SRC_PATH)/tests/fate/mp3.mak
68 include $(SRC_PATH)/tests/fate/mpc.mak
69 include $(SRC_PATH)/tests/fate/pcm.mak
70 include $(SRC_PATH)/tests/fate/prores.mak
71 include $(SRC_PATH)/tests/fate/qt.mak
72 include $(SRC_PATH)/tests/fate/qtrle.mak
73 include $(SRC_PATH)/tests/fate/real.mak
74 include $(SRC_PATH)/tests/fate/screen.mak
75 include $(SRC_PATH)/tests/fate/utvideo.mak
76 include $(SRC_PATH)/tests/fate/video.mak
77 include $(SRC_PATH)/tests/fate/voice.mak
78 include $(SRC_PATH)/tests/fate/vorbis.mak
79 include $(SRC_PATH)/tests/fate/vpx.mak
80 include $(SRC_PATH)/tests/fate/vqf.mak
81 include $(SRC_PATH)/tests/fate/wavpack.mak
82 include $(SRC_PATH)/tests/fate/wma.mak
83
84 FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
85 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
86 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
87 FATE_VCODEC  = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
88 FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
89 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
90 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
91 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
92
93 FATE = $(FATE_ACODEC)                                                   \
94        $(FATE_VCODEC)                                                   \
95        $(FATE_LAVF)                                                     \
96        $(FATE_SEEK)                                                     \
97
98 FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
99
100 FATE += $(FATE-yes)
101
102 $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
103 $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
104 $(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
105 $(FATE_LAVF):   $(REFS)
106 $(FATE_LAVFI):  $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
107 $(FATE_SEEK):   fate-codec fate-lavf libavformat/seek-test$(EXESUF)
108
109 $(FATE_ACODEC):  CMD = codectest acodec
110 $(FATE_VSYNTH1): CMD = codectest vsynth1
111 $(FATE_VSYNTH2): CMD = codectest vsynth2
112 $(FATE_LAVF_FATE): CMD = lavffatetest
113 $(FATE_LAVF):    CMD = lavftest
114 $(FATE_LAVFI):   CMD = lavfitest
115 $(FATE_SEEK):    CMD = seektest
116
117 fate-codec:  fate-acodec fate-vcodec
118 fate-acodec: $(FATE_ACODEC)
119 fate-vcodec: $(FATE_VCODEC)
120 fate-lavf-fate: $(FATE_LAVF_FATE)
121 fate-lavf:   $(FATE_LAVF)
122 fate-lavfi:  $(FATE_LAVFI)
123 fate-seek:   $(FATE_SEEK)
124
125 ifdef SAMPLES
126 FATE += $(FATE_LAVF_FATE)
127 FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
128 fate-rsync:
129         rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES)
130 else
131 fate::
132         @echo "warning: only a subset of the fate tests will be run because SAMPLES is not specified"
133 fate-rsync:
134         @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
135 $(FATE_TESTS):
136         @echo "SAMPLES not specified, cannot run FATE"
137 endif
138
139 FATE_UTILS = base64 tiny_psnr
140
141 TOOL = ffmpeg
142
143 fate:: $(FATE)
144
145 $(FATE): $(TOOL)$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
146         @echo "TEST    $(@:fate-%=%)"
147         $(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)'
148
149 fate-list:
150         @printf '%s\n' $(sort $(FATE))
151
152 clean:: testclean
153
154 testclean:
155         $(RM) -r tests/vsynth1 tests/vsynth2 tests/data tools/lavfi-showfiltfmts$(EXESUF)
156         $(RM) $(CLEANSUFFIXES:%=tests/%)
157         $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
158
159 -include $(wildcard tests/*.d)
160
161 .PHONY: fate*