2002-05-18 23:18:22 +00:00
|
|
|
#
|
|
|
|
# Makefile for tests
|
2002-05-25 22:47:17 +00:00
|
|
|
# (c) 2002 Fabrice Bellard
|
2002-05-18 23:18:22 +00:00
|
|
|
#
|
|
|
|
include ../config.mak
|
|
|
|
|
2006-11-08 00:02:15 +00:00
|
|
|
VPATH=$(SRC_PATH_BARE)/tests
|
|
|
|
SRC_DIR=$(SRC_PATH)/tests
|
2006-12-23 00:22:15 +00:00
|
|
|
BUILD_DIR=$(BUILD_ROOT)/tests
|
2002-05-18 23:18:22 +00:00
|
|
|
CFLAGS=-O2 -Wall -g
|
2002-08-27 22:20:01 +00:00
|
|
|
|
2006-11-08 00:02:15 +00:00
|
|
|
REFFILE1=$(SRC_DIR)/ffmpeg.regression.ref
|
|
|
|
REFFILE2=$(SRC_DIR)/rotozoom.regression.ref
|
2002-08-27 22:20:01 +00:00
|
|
|
|
2006-11-08 00:02:15 +00:00
|
|
|
SERVER_REFFILE=$(SRC_DIR)/ffserver.regression.ref
|
2002-12-12 19:53:05 +00:00
|
|
|
|
2006-11-08 00:02:15 +00:00
|
|
|
LIBAV_REFFILE=$(SRC_DIR)/libav.regression.ref
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2007-02-05 18:15:03 +00:00
|
|
|
SEEK_REFFILE=$(SRC_DIR)/seek.regression.ref
|
|
|
|
|
2007-04-22 19:19:43 +00:00
|
|
|
all fulltest test: codectest libavtest seektest
|
2002-12-12 19:53:05 +00:00
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
test-server: vsynth1/00.pgm asynth1.sw
|
2007-01-25 12:56:14 +00:00
|
|
|
@echo
|
|
|
|
@echo "Unfortunately ffserver is broken and therefore its regression"
|
|
|
|
@echo "test fails randomly. Treat the results accordingly."
|
|
|
|
@echo
|
2006-11-08 00:02:15 +00:00
|
|
|
@$(SRC_DIR)/server-regression.sh $(SERVER_REFFILE) $(SRC_DIR)/test.conf
|
2002-05-18 23:18:22 +00:00
|
|
|
|
|
|
|
# fast regression tests for all codecs
|
2006-10-15 12:08:42 +00:00
|
|
|
codectest mpeg4 mpeg ac3 snow snowll: vsynth1/00.pgm vsynth2/00.pgm asynth1.sw tiny_psnr$(EXESUF)
|
2006-11-08 00:02:15 +00:00
|
|
|
@$(SRC_DIR)/regression.sh $@ $(REFFILE1) vsynth1
|
|
|
|
@$(SRC_DIR)/regression.sh $@ $(REFFILE2) vsynth2
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2002-05-20 16:20:05 +00:00
|
|
|
# fast regression for libav formats
|
2006-10-18 10:09:16 +00:00
|
|
|
ifeq ($(CONFIG_GPL),yes)
|
2006-10-15 12:08:42 +00:00
|
|
|
libavtest: vsynth1/00.pgm asynth1.sw
|
2006-11-08 00:02:15 +00:00
|
|
|
@$(SRC_DIR)/regression.sh $@ $(LIBAV_REFFILE) vsynth1
|
2006-10-18 10:09:16 +00:00
|
|
|
else
|
|
|
|
libavtest:
|
2006-10-15 12:10:46 +00:00
|
|
|
@echo
|
|
|
|
@echo "This test requires FFmpeg to be compiled with --enable-gpl."
|
|
|
|
@echo
|
2006-10-18 10:09:16 +00:00
|
|
|
endif
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2007-01-10 20:40:02 +00:00
|
|
|
ifeq ($(CONFIG_SWSCALER),yes)
|
|
|
|
test-server codectest mpeg4 mpeg ac3 snow snowll libavtest: swscale_error
|
|
|
|
swscale_error:
|
|
|
|
@echo
|
|
|
|
@echo "This regression test is incompatible with --enable-swscaler."
|
|
|
|
@echo
|
|
|
|
@exit 1
|
|
|
|
endif
|
|
|
|
|
2007-02-05 18:15:03 +00:00
|
|
|
seektest: seek_test$(EXESUF)
|
|
|
|
@$(SRC_DIR)/seek_test.sh $(SEEK_REFFILE)
|
|
|
|
|
2002-05-27 08:39:04 +00:00
|
|
|
# video generation
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
vsynth1/00.pgm: videogen$(EXESUF)
|
2002-05-18 23:18:22 +00:00
|
|
|
@mkdir -p vsynth1
|
2006-12-23 00:22:15 +00:00
|
|
|
$(BUILD_DIR)/$< 'vsynth1/'
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2006-10-15 12:08:42 +00:00
|
|
|
vsynth2/00.pgm: rotozoom$(EXESUF)
|
2003-04-11 13:43:17 +00:00
|
|
|
@mkdir -p vsynth2
|
2006-12-23 00:22:15 +00:00
|
|
|
$(BUILD_DIR)/$< 'vsynth2/' $(SRC_DIR)/lena.pnm
|
2003-04-11 13:43:17 +00:00
|
|
|
|
2002-05-18 23:18:22 +00:00
|
|
|
# audio generation
|
|
|
|
|
2006-08-03 17:27:33 +00:00
|
|
|
asynth1.sw: audiogen$(EXESUF)
|
2006-12-23 00:22:15 +00:00
|
|
|
$(BUILD_DIR)/$< $@
|
2002-05-18 23:18:22 +00:00
|
|
|
|
2007-05-24 23:32:50 +00:00
|
|
|
%$(EXESUF): %.c
|
2003-04-10 21:29:31 +00:00
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $<
|
2005-12-17 18:14:38 +00:00
|
|
|
|
2007-05-27 13:36:02 +00:00
|
|
|
seek_test$(EXESUF): seek_test.c
|
|
|
|
$(CC) $(LDFLAGS) $(CFLAGS) -DHAVE_AV_CONFIG_H -I.. -I$(SRC_PATH)/libavformat -I$(SRC_PATH)/libavcodec -I$(SRC_PATH)/libavutil -o $@ $< $(BUILD_ROOT)/libavformat/libavformat.a $(BUILD_ROOT)/libavcodec/libavcodec.a $(BUILD_ROOT)/libavutil/libavutil.a $(EXTRALIBS)
|
2007-02-05 18:15:03 +00:00
|
|
|
|
2006-01-16 14:59:54 +00:00
|
|
|
distclean clean:
|
2007-05-25 12:41:41 +00:00
|
|
|
rm -rf vsynth1 vsynth2 data asynth1.sw *~
|
|
|
|
rm -f $(addsuffix $(EXESUF),audiogen videogen rotozoom seek_test tiny_psnr)
|
2006-10-03 17:42:17 +00:00
|
|
|
|
2007-02-06 21:31:05 +00:00
|
|
|
.PHONY: all fulltest test codectest libavtest test-server seektest
|
2006-10-03 17:42:17 +00:00
|
|
|
.PHONY: mpeg4 mpeg ac3 snow snowll distclean clean
|