fate: split off mpc FATE tests into their own file
[ffmpeg.git] / tests / Makefile
1 AREF = fate-acodec-aref
2 VREF = fate-vsynth1-vref fate-vsynth2-vref
3 REFS = $(AREF) $(VREF)
4
5 $(VREF): avconv$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
6 $(AREF): avconv$(EXESUF) tests/data/asynth1.sw
7
8 tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
9         @mkdir -p tests/vsynth1
10         $(M)./$< 'tests/vsynth1/'
11
12 tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
13         @mkdir -p tests/vsynth2
14         $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
15
16 tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
17         @mkdir -p tests/data
18         $(M)./$< $@
19
20 tests/data/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF)
21         @mkdir -p tests/data
22         $(M)./$< $@ 16000 1
23
24 tests/data/asynth%.sw tests/vsynth%/00.pgm: TAG = GEN
25
26 include $(SRC_PATH)/tests/fate.mak
27 include $(SRC_PATH)/tests/fate2.mak
28
29 include $(SRC_PATH)/tests/fate/aac.mak
30 include $(SRC_PATH)/tests/fate/ac3.mak
31 include $(SRC_PATH)/tests/fate/als.mak
32 include $(SRC_PATH)/tests/fate/amrnb.mak
33 include $(SRC_PATH)/tests/fate/amrwb.mak
34 include $(SRC_PATH)/tests/fate/atrac.mak
35 include $(SRC_PATH)/tests/fate/dct.mak
36 include $(SRC_PATH)/tests/fate/fft.mak
37 include $(SRC_PATH)/tests/fate/h264.mak
38 include $(SRC_PATH)/tests/fate/image.mak
39 include $(SRC_PATH)/tests/fate/indeo.mak
40 include $(SRC_PATH)/tests/fate/libavcodec.mak
41 include $(SRC_PATH)/tests/fate/libavutil.mak
42 include $(SRC_PATH)/tests/fate/lossless-audio.mak
43 include $(SRC_PATH)/tests/fate/lossless-video.mak
44 include $(SRC_PATH)/tests/fate/microsoft.mak
45 include $(SRC_PATH)/tests/fate/mp3.mak
46 include $(SRC_PATH)/tests/fate/mpc.mak
47 include $(SRC_PATH)/tests/fate/prores.mak
48 include $(SRC_PATH)/tests/fate/qtrle.mak
49 include $(SRC_PATH)/tests/fate/real.mak
50 include $(SRC_PATH)/tests/fate/screen.mak
51 include $(SRC_PATH)/tests/fate/utvideo.mak
52 include $(SRC_PATH)/tests/fate/vorbis.mak
53 include $(SRC_PATH)/tests/fate/vpx.mak
54 include $(SRC_PATH)/tests/fate/wma.mak
55
56 FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
57 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
58 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
59 FATE_VCODEC  = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
60 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
61 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
62 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
63
64 FATE = $(FATE_ACODEC)                                                   \
65        $(FATE_VCODEC)                                                   \
66        $(FATE_LAVF)                                                     \
67        $(FATE_SEEK)                                                     \
68
69 FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
70
71 FATE += $(FATE-yes)
72
73 $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
74 $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
75 $(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
76 $(FATE_LAVF):   $(REFS)
77 $(FATE_LAVFI):  $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
78 $(FATE_SEEK):   fate-codec fate-lavf libavformat/seek-test$(EXESUF)
79
80 $(FATE_ACODEC):  CMD = codectest acodec
81 $(FATE_VSYNTH1): CMD = codectest vsynth1
82 $(FATE_VSYNTH2): CMD = codectest vsynth2
83 $(FATE_LAVF):    CMD = lavftest
84 $(FATE_LAVFI):   CMD = lavfitest
85 $(FATE_SEEK):    CMD = seektest
86
87 fate-codec:  fate-acodec fate-vcodec
88 fate-acodec: $(FATE_ACODEC)
89 fate-vcodec: $(FATE_VCODEC)
90 fate-lavf:   $(FATE_LAVF)
91 fate-lavfi:  $(FATE_LAVFI)
92 fate-seek:   $(FATE_SEEK)
93
94 ifdef SAMPLES
95 FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
96 fate-rsync:
97         rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
98 else
99 fate-rsync:
100         @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
101 $(FATE_TESTS):
102         @echo "SAMPLES not specified, cannot run FATE"
103 endif
104
105 FATE_UTILS = base64 tiny_psnr
106
107 fate: $(FATE)
108
109 $(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
110         @echo "TEST    $(@:fate-%=%)"
111         $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
112
113 fate-list:
114         @printf '%s\n' $(sort $(FATE))
115
116 clean:: testclean
117
118 testclean:
119         $(RM) -r tests/vsynth1 tests/vsynth2 tests/data
120         $(RM) $(CLEANSUFFIXES:%=tests/%)
121         $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
122
123 -include $(wildcard tests/*.d)
124
125 .PHONY: fate*