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