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