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