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