showwaves: fix PTS computation.
[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/dct.mak
52 include $(SRC_PATH)/tests/fate/demux.mak
53 include $(SRC_PATH)/tests/fate/dfa.mak
54 include $(SRC_PATH)/tests/fate/dpcm.mak
55 include $(SRC_PATH)/tests/fate/ea.mak
56 include $(SRC_PATH)/tests/fate/fft.mak
57 include $(SRC_PATH)/tests/fate/h264.mak
58 include $(SRC_PATH)/tests/fate/image.mak
59 include $(SRC_PATH)/tests/fate/indeo.mak
60 include $(SRC_PATH)/tests/fate/libavcodec.mak
61 include $(SRC_PATH)/tests/fate/libavutil.mak
62 include $(SRC_PATH)/tests/fate/mapchan.mak
63 include $(SRC_PATH)/tests/fate/lossless-audio.mak
64 include $(SRC_PATH)/tests/fate/lossless-video.mak
65 include $(SRC_PATH)/tests/fate/microsoft.mak
66 include $(SRC_PATH)/tests/fate/mp3.mak
67 include $(SRC_PATH)/tests/fate/mpc.mak
68 include $(SRC_PATH)/tests/fate/pcm.mak
69 include $(SRC_PATH)/tests/fate/probe.mak
70 include $(SRC_PATH)/tests/fate/prores.mak
71 include $(SRC_PATH)/tests/fate/qt.mak
72 include $(SRC_PATH)/tests/fate/qtrle.mak
73 include $(SRC_PATH)/tests/fate/real.mak
74 include $(SRC_PATH)/tests/fate/screen.mak
75 include $(SRC_PATH)/tests/fate/utvideo.mak
76 include $(SRC_PATH)/tests/fate/video.mak
77 include $(SRC_PATH)/tests/fate/voice.mak
78 include $(SRC_PATH)/tests/fate/vorbis.mak
79 include $(SRC_PATH)/tests/fate/vpx.mak
80 include $(SRC_PATH)/tests/fate/vqf.mak
81 include $(SRC_PATH)/tests/fate/wavpack.mak
82 include $(SRC_PATH)/tests/fate/wma.mak
83
84 FATE_LAVF_FATE = $(LAVF_FATE_TESTS:%=fate-lavf-fate-%)
85 FATE_LAVF    = $(LAVF_TESTS:%=fate-lavf-%)
86 FATE_LAVFI   = $(LAVFI_TESTS:%=fate-lavfi-%)
87 FATE_SEEK    = $(SEEK_TESTS:seek_%=fate-seek-%)
88
89 FATE_AVCONV += $(FATE_LAVF)                                             \
90                $(FATE_LAVFI)                                            \
91                $(FATE_SEEK)                                             \
92
93 FATE_FFMPEG += $(FATE_FFMPEG-yes) $(FATE_AVCONV) $(FATE_AVCONV-yes)
94 FATE-$(CONFIG_FFMPEG) += $(FATE_FFMPEG)
95
96 FATE-$(CONFIG_AVCODEC)  += $(FATE_LIBAVCODEC)
97
98 FATE_SAMPLES-$(CONFIG_FFMPEG) += $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG)
99 FATE_SAMPLES += $(FATE_SAMPLES-yes)
100
101 FATE += $(FATE-yes)
102 FATE += $(FATE_LIBAVUTIL)
103
104 $(FATE_FFMPEG) $(FATE_LAVF_FATE) $(FATE_SAMPLES_AVCONV) $(FATE_SAMPLES_FFMPEG): ffmpeg$(EXESUF)
105
106 $(FATE_LAVF):  $(AREF) $(VREF)
107 $(FATE_LAVFI): $(VREF) tools/lavfi-showfiltfmts$(EXESUF)
108 $(FATE_SEEK):  fate-acodec fate-vsynth2 fate-lavf libavformat/seek-test$(EXESUF)
109
110 $(FATE_LAVF_FATE): CMD = lavffatetest
111 $(FATE_LAVF):    CMD = lavftest
112 $(FATE_LAVFI):   CMD = lavfitest
113 $(FATE_SEEK):    CMD = seektest
114
115 fate-lavf-fate: $(FATE_LAVF_FATE)
116 fate-lavf:   $(FATE_LAVF)
117 fate-lavfi:  $(FATE_LAVFI)
118 fate-seek:   $(FATE_SEEK)
119
120 ifdef SAMPLES
121 FATE += $(FATE_LAVF_FATE)
122 FATE += $(FATE_FULL) $(FATE_FULL-yes)
123 FATE += $(FATE_SAMPLES)
124 fate-rsync:
125         rsync -vaLW --timeout=60 --contimeout=60 rsync://fate.ffmpeg.org/fate-suite/ $(SAMPLES)
126 else
127 fate::
128         @echo "warning: only a subset of the fate tests will be run because SAMPLES is not specified"
129 fate-rsync:
130         @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
131 $(FATE_SAMPLES):
132         @echo "$@ requires external samples and SAMPLES not specified"; false
133 endif
134
135 FATE_UTILS = base64 tiny_psnr
136
137 TOOL = ffmpeg
138
139 fate:: $(FATE)
140
141 $(FATE) $(FATE_TESTS-no): $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
142         @echo "TEST    $(@:fate-%=%)"
143         $(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)'
144
145 fate-list:
146         @printf '%s\n' $(sort $(FATE))
147
148 clean:: testclean
149
150 testclean:
151         $(RM) -r tests/vsynth1 tests/data tools/lavfi-showfiltfmts$(EXESUF)
152         $(RM) $(CLEANSUFFIXES:%=tests/%)
153         $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
154
155 -include $(wildcard tests/*.d)
156
157 .PHONY: fate*