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