501a72f879876aebd99001a70c71080df4eaa2c2
[libav.git] / tests / Makefile
1 FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
2
3 AREF = fate-acodec-aref
4 VREF = fate-vsynth1-vref fate-vsynth2-vref
5 REFS = $(AREF) $(VREF)
6
7 $(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
8 $(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
9
10 ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
11 @echo
12 @echo "Unfortunately ffserver is broken and therefore its regression"
13 @echo "test fails randomly. Treat the results accordingly."
14 @echo
15 $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
16
17 tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
18 @mkdir -p tests/vsynth1
19 $(M)./$< 'tests/vsynth1/'
20
21 tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
22 @mkdir -p tests/vsynth2
23 $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
24
25 tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
26 @mkdir -p tests/data
27 $(M)./$< $@
28
29 tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
30
31 tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
32 $(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
33
34 include $(SRC_PATH)/tests/fate.mak
35 include $(SRC_PATH)/tests/fate2.mak
36
37 include $(SRC_PATH)/tests/fate/aac.mak
38 include $(SRC_PATH)/tests/fate/als.mak
39 include $(SRC_PATH)/tests/fate/amrnb.mak
40 include $(SRC_PATH)/tests/fate/amrwb.mak
41 include $(SRC_PATH)/tests/fate/dct.mak
42 include $(SRC_PATH)/tests/fate/fft.mak
43 include $(SRC_PATH)/tests/fate/h264.mak
44 include $(SRC_PATH)/tests/fate/libavutil.mak
45 include $(SRC_PATH)/tests/fate/mp3.mak
46 include $(SRC_PATH)/tests/fate/vorbis.mak
47 include $(SRC_PATH)/tests/fate/vp8.mak
48
49 FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
50 FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
51 FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
52 FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
53 FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
54 FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
55 FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
56
57 FATE = $(FATE_ACODEC) \
58 $(FATE_VCODEC) \
59 $(FATE_LAVF) \
60 $(FATE_LAVFI) \
61 $(FATE_SEEK) \
62
63 $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
64 $(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
65 $(FATE_LAVF): $(REFS)
66 $(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
67 $(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF)
68
69 $(FATE_ACODEC): CMD = codectest acodec
70 $(FATE_VSYNTH1): CMD = codectest vsynth1
71 $(FATE_VSYNTH2): CMD = codectest vsynth2
72 $(FATE_LAVF): CMD = lavftest
73 $(FATE_LAVFI): CMD = lavfitest
74 $(FATE_SEEK): CMD = seektest
75
76 fate-codec: fate-acodec fate-vcodec
77 fate-acodec: $(FATE_ACODEC)
78 fate-vcodec: $(FATE_VCODEC)
79 fate-lavf: $(FATE_LAVF)
80 fate-lavfi: $(FATE_LAVFI)
81 fate-seek: $(FATE_SEEK)
82
83 ifdef SAMPLES
84 FATE += $(FATE_TESTS)
85 fate-rsync:
86 rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
87 else
88 fate-rsync:
89 @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
90 $(FATE_TESTS):
91 @echo "SAMPLES not specified, cannot run FATE"
92 endif
93
94 FATE_UTILS = base64 tiny_psnr
95
96 fate: $(FATE)
97
98 $(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
99 @echo "TEST $(@:fate-%=%)"
100 $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
101
102 fate-list:
103 @printf '%s\n' $(sort $(FATE))
104
105 clean:: testclean
106
107 testclean:
108 $(RM) -r tests/vsynth1 tests/vsynth2 tests/data
109 $(RM) $(CLEANSUFFIXES:%=tests/%)
110 $(RM) tests/seek_test$(EXESUF) tests/seek_test.o
111 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
112
113 -include $(wildcard tests/*.d)
114
115 .PHONY: fate*