fate: split off lossless video and audio FATE tests into their own files
[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/asynth-16000-1.sw: tests/audiogen$(HOSTEXESUF)
21 @mkdir -p tests/data
22 $(M)./$< $@ 16000 1
23
24 tests/data/asynth%.sw tests/vsynth%/00.pgm: TAG = GEN
25
26 include $(SRC_PATH)/tests/fate.mak
27 include $(SRC_PATH)/tests/fate2.mak
28
29 include $(SRC_PATH)/tests/fate/aac.mak
30 include $(SRC_PATH)/tests/fate/ac3.mak
31 include $(SRC_PATH)/tests/fate/als.mak
32 include $(SRC_PATH)/tests/fate/amrnb.mak
33 include $(SRC_PATH)/tests/fate/amrwb.mak
34 include $(SRC_PATH)/tests/fate/dct.mak
35 include $(SRC_PATH)/tests/fate/fft.mak
36 include $(SRC_PATH)/tests/fate/h264.mak
37 include $(SRC_PATH)/tests/fate/libavutil.mak
38 include $(SRC_PATH)/tests/fate/lossless-audio.mak
39 include $(SRC_PATH)/tests/fate/lossless-video.mak
40 include $(SRC_PATH)/tests/fate/mp3.mak
41 include $(SRC_PATH)/tests/fate/prores.mak
42 include $(SRC_PATH)/tests/fate/qtrle.mak
43 include $(SRC_PATH)/tests/fate/real.mak
44 include $(SRC_PATH)/tests/fate/screen.mak
45 include $(SRC_PATH)/tests/fate/utvideo.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_SEEK) \
61
62 FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
63
64 FATE += $(FATE-yes)
65
66 $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
67 $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
68 $(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
69 $(FATE_LAVF): $(REFS)
70 $(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
71 $(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF)
72
73 $(FATE_ACODEC): CMD = codectest acodec
74 $(FATE_VSYNTH1): CMD = codectest vsynth1
75 $(FATE_VSYNTH2): CMD = codectest vsynth2
76 $(FATE_LAVF): CMD = lavftest
77 $(FATE_LAVFI): CMD = lavfitest
78 $(FATE_SEEK): CMD = seektest
79
80 fate-codec: fate-acodec fate-vcodec
81 fate-acodec: $(FATE_ACODEC)
82 fate-vcodec: $(FATE_VCODEC)
83 fate-lavf: $(FATE_LAVF)
84 fate-lavfi: $(FATE_LAVFI)
85 fate-seek: $(FATE_SEEK)
86
87 ifdef SAMPLES
88 FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
89 fate-rsync:
90 rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
91 else
92 fate-rsync:
93 @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
94 $(FATE_TESTS):
95 @echo "SAMPLES not specified, cannot run FATE"
96 endif
97
98 FATE_UTILS = base64 tiny_psnr
99
100 fate: $(FATE)
101
102 $(FATE): avconv$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
103 @echo "TEST $(@:fate-%=%)"
104 $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
105
106 fate-list:
107 @printf '%s\n' $(sort $(FATE))
108
109 clean:: testclean
110
111 testclean:
112 $(RM) -r tests/vsynth1 tests/vsynth2 tests/data
113 $(RM) $(CLEANSUFFIXES:%=tests/%)
114 $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
115
116 -include $(wildcard tests/*.d)
117
118 .PHONY: fate*