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