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