Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
  2. AREF = fate-acodec-aref
  3. VREF = fate-vsynth1-vref fate-vsynth2-vref
  4. REFS = $(AREF) $(VREF)
  5. $(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
  6. $(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
  7. ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
  8. @echo
  9. @echo "Unfortunately ffserver is broken and therefore its regression"
  10. @echo "test fails randomly. Treat the results accordingly."
  11. @echo
  12. $(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
  13. tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
  14. @mkdir -p tests/vsynth1
  15. $(M)./$< 'tests/vsynth1/'
  16. tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
  17. @mkdir -p tests/vsynth2
  18. $(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
  19. tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
  20. @mkdir -p tests/data
  21. $(M)./$< $@
  22. tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
  23. include $(SRC_PATH)/tests/fate.mak
  24. include $(SRC_PATH)/tests/fate2.mak
  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. FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
  37. FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
  38. FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
  39. FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
  40. FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
  41. FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
  42. FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
  43. FATE = $(FATE_ACODEC) \
  44. $(FATE_VCODEC) \
  45. $(FATE_LAVF) \
  46. $(FATE_SEEK) \
  47. FATE-$(CONFIG_AVFILTER) += $(FATE_LAVFI)
  48. FATE += $(FATE-yes)
  49. $(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
  50. $(filter-out %-vref,$(FATE_VSYNTH1)): fate-vsynth1-vref
  51. $(filter-out %-vref,$(FATE_VSYNTH2)): fate-vsynth2-vref
  52. $(FATE_LAVF): $(REFS)
  53. $(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
  54. $(FATE_SEEK): fate-codec fate-lavf libavformat/seek-test$(EXESUF)
  55. $(FATE_ACODEC): CMD = codectest acodec
  56. $(FATE_VSYNTH1): CMD = codectest vsynth1
  57. $(FATE_VSYNTH2): CMD = codectest vsynth2
  58. $(FATE_LAVF): CMD = lavftest
  59. $(FATE_LAVFI): CMD = lavfitest
  60. $(FATE_SEEK): CMD = seektest
  61. fate-codec: fate-acodec fate-vcodec
  62. fate-acodec: $(FATE_ACODEC)
  63. fate-vcodec: $(FATE_VCODEC)
  64. fate-lavf: $(FATE_LAVF)
  65. fate-lavfi: $(FATE_LAVFI)
  66. fate-seek: $(FATE_SEEK)
  67. ifdef SAMPLES
  68. FATE += $(FATE_TESTS) $(FATE_TESTS-yes)
  69. fate-rsync:
  70. rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
  71. else
  72. fate-rsync:
  73. @echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
  74. $(FATE_TESTS):
  75. @echo "SAMPLES not specified, cannot run FATE"
  76. endif
  77. FATE_UTILS = base64 tiny_psnr
  78. fate: $(FATE)
  79. $(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
  80. @echo "TEST $(@:fate-%=%)"
  81. $(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
  82. fate-list:
  83. @printf '%s\n' $(sort $(FATE))
  84. clean:: testclean
  85. testclean:
  86. $(RM) -r tests/vsynth1 tests/vsynth2 tests/data tools/lavfi-showfiltfmts$(EXESUF)
  87. $(RM) $(CLEANSUFFIXES:%=tests/%)
  88. $(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
  89. -include $(wildcard tests/*.d)
  90. .PHONY: fate*