fate: teach videogen/rotozoom to output a single raw video stream
[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 # Required due to missing automatic dependency tracking for HOSTOBJS.
11 tests/rotozoom.o tests/videogen.o: tests/utils.c
12
13 tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF) | tests/vsynth1
14         $(M)./$< 'tests/vsynth1/'
15
16 tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF) | tests/vsynth2
17         $(M)./$< $(SRC_PATH)/tests/lena.pnm 'tests/vsynth2/'
18
19 tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF) | tests/data
20         $(M)./$< $@
21
22 tests/data/asynth-%.wav: tests/audiogen$(HOSTEXESUF) | tests/data
23         $(M)./$< $@ $(subst -, ,$*)
24
25 tests/data/asynth% tests/vsynth%/00.pgm: TAG = GEN
26
27 include $(SRC_PATH)/tests/fate/aac.mak
28 include $(SRC_PATH)/tests/fate/ac3.mak
29 include $(SRC_PATH)/tests/fate/adpcm.mak
30 include $(SRC_PATH)/tests/fate/als.mak
31 include $(SRC_PATH)/tests/fate/amrnb.mak
32 include $(SRC_PATH)/tests/fate/amrwb.mak
33 include $(SRC_PATH)/tests/fate/atrac.mak
34 include $(SRC_PATH)/tests/fate/audio.mak
35 include $(SRC_PATH)/tests/fate/bmp.mak
36 include $(SRC_PATH)/tests/fate/cdxl.mak
37 include $(SRC_PATH)/tests/fate/dct.mak
38 include $(SRC_PATH)/tests/fate/demux.mak
39 include $(SRC_PATH)/tests/fate/dfa.mak
40 include $(SRC_PATH)/tests/fate/dpcm.mak
41 include $(SRC_PATH)/tests/fate/ea.mak
42 include $(SRC_PATH)/tests/fate/fft.mak
43 include $(SRC_PATH)/tests/fate/h264.mak
44 include $(SRC_PATH)/tests/fate/image.mak
45 include $(SRC_PATH)/tests/fate/indeo.mak
46 include $(SRC_PATH)/tests/fate/libavcodec.mak
47 include $(SRC_PATH)/tests/fate/libavutil.mak
48 include $(SRC_PATH)/tests/fate/lossless-audio.mak
49 include $(SRC_PATH)/tests/fate/lossless-video.mak
50 include $(SRC_PATH)/tests/fate/microsoft.mak
51 include $(SRC_PATH)/tests/fate/mp3.mak
52 include $(SRC_PATH)/tests/fate/mpc.mak
53 include $(SRC_PATH)/tests/fate/pcm.mak
54 include $(SRC_PATH)/tests/fate/probe.mak
55 include $(SRC_PATH)/tests/fate/prores.mak
56 include $(SRC_PATH)/tests/fate/qt.mak
57 include $(SRC_PATH)/tests/fate/qtrle.mak
58 include $(SRC_PATH)/tests/fate/real.mak
59 include $(SRC_PATH)/tests/fate/screen.mak
60 include $(SRC_PATH)/tests/fate/utvideo.mak
61 include $(SRC_PATH)/tests/fate/video.mak
62 include $(SRC_PATH)/tests/fate/voice.mak
63 include $(SRC_PATH)/tests/fate/vorbis.mak
64 include $(SRC_PATH)/tests/fate/vpx.mak
65 include $(SRC_PATH)/tests/fate/vqf.mak
66 include $(SRC_PATH)/tests/fate/wavpack.mak
67 include $(SRC_PATH)/tests/fate/wma.mak
68
69 FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
70 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
71 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
72 FATE_VCODEC  = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
73 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
74 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
75 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
76
77 FATE_AVCONV += $(FATE_ACODEC)                                           \
78                $(FATE_VCODEC)                                           \
79                $(FATE_LAVF)                                             \
80                $(FATE_LAVFI)                                            \
81                $(FATE_SEEK)                                             \
82
83 FATE_AVCONV += $(FATE_AVCONV-yes)
84 FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV)
85
86 FATE-$(CONFIG_AVCODEC)  += $(FATE_LIBAVCODEC)
87
88 FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV)
89 FATE_SAMPLES += $(FATE_SAMPLES-yes)
90
91 FATE += $(FATE-yes)
92 FATE += $(FATE_LIBAVUTIL)
93
94 $(FATE_AVCONV) $(FATE_SAMPLES_AVCONV): avconv$(EXESUF)
95
96 $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
97 $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
98 $(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
99 $(FATE_LAVF):   $(REFS)
100 $(FATE_LAVFI):  $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
101 $(FATE_SEEK):   fate-codec fate-lavf libavformat/seek-test$(EXESUF)
102
103 $(FATE_ACODEC):  CMD = codectest acodec
104 $(FATE_VSYNTH1): CMD = codectest vsynth1
105 $(FATE_VSYNTH2): CMD = codectest vsynth2
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_LAVF)
114 fate-lavfi:  $(FATE_LAVFI)
115 fate-seek:   $(FATE_SEEK)
116
117 ifdef SAMPLES
118 FATE += $(FATE_SAMPLES)
119 fate-rsync:
120         rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
121 else
122 fate-rsync:
123         @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
124 $(FATE_SAMPLES):
125         @echo "$@ requires external samples and SAMPLES not specified"; false
126 endif
127
128 FATE_UTILS = base64 tiny_psnr
129
130 fate: $(FATE)
131
132 $(FATE): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
133         @echo "TEST    $(@:fate-%=%)"
134         $(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)'
135
136 fate-list:
137         @printf '%s\n' $(sort $(FATE))
138
139 clean:: testclean
140
141 testclean:
142         $(RM) -r tests/vsynth1 tests/vsynth2 tests/data
143         $(RM) $(CLEANSUFFIXES:%=tests/%)
144         $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
145
146 -include $(wildcard tests/*.d)
147
148 .PHONY: fate*