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