[FFmpeg-devel] [RFC] swscale regression tests

Måns Rullgård mans
Tue Jul 20 12:22:41 CEST 2010


Ramiro Polla <ramiro.polla at gmail.com> writes:

> Hi,
>
> I have attached an attempt at making swscale regression tests. This
> method creates one file for each input pixel format (currently 42) and
> compresses the output with bzip2. I have not tested with different
> platforms (x86_64 linux only yet), and IIRC it doesn't give the same
> result on all platforms. This is just a request for comments whether
> this approach is good. I have also removed the fast bilinear test
> since it works differently on many platforms and would make the
> regression tests more complex (like keeping one reference file for
> each platform).
>
> The output bzip2ed files add 280Kb of binary data to repository (5.6Mb
> uncompressed). As for disk usage (with 'du'), it takes 340Kb (5.8Mb
> uncompressed).

Why can't you store a checksum instead?

> Index: Makefile
> ===================================================================
> --- Makefile	(revision 24341)
> +++ Makefile	(working copy)
> @@ -180,12 +180,14 @@
>  VCODEC_TESTS := $(addprefix regtest-, $(VCODEC_TESTS) $(VCODEC_TESTS-yes))
>  LAVF_TESTS  := $(addprefix regtest-, $(LAVF_TESTS)  $(LAVF_TESTS-yes))
>  LAVFI_TESTS := $(addprefix regtest-, $(LAVFI_TESTS) $(LAVFI_TESTS-yes))
> +SWSCALE_TESTS := $(addprefix regtest-, $(SWSCALE_TESTS) $(SWSCALE_TESTS-yes))
>  
>  CODEC_TESTS = $(VCODEC_TESTS) $(ACODEC_TESTS)
>  
>  codectest: $(CODEC_TESTS)
>  lavftest:  $(LAVF_TESTS)
>  lavfitest: $(LAVFI_TESTS)
> +swscaletest: $(SWSCALE_TESTS)
>  
>  AREF = tests/data/acodec.ref.wav
>  VREF = tests/data/vsynth1.ref.yuv
> @@ -234,6 +236,11 @@
>  	@$(SRC_PATH)/tests/lavfi-regression.sh $@ lavfi tests/vsynth1 "$(TARGET_EXEC)" "$(TARGET_PATH)"
>  	@diff -u -w $(call REFFILE,lavfi,$@) $(call RESFILE,lavfi,$@)
>  
> +$(SWSCALE_TESTS): libswscale/swscale-test$(EXESUF)
> +	@echo "TEST: SWSCALE $(@:regtest-%=%)"
> +	@$(SRC_PATH)/tests/swscale-regression.sh $@ swscale tests/swscale "$(TARGET_EXEC)" "$(TARGET_PATH)"
> +	@bzdiff -u -w $(call REFFILE,swscale,$@).bz2 $(call RESFILE,swscale,$@).bz2
> +
>  seektest: codectest lavftest tests/seek_test$(EXESUF)
>  	$(SRC_PATH)/tests/seek-regression.sh $(SRC_PATH) "$(TARGET_EXEC)" "$(TARGET_PATH)"

This no longer applies.  I have changed the way regtests are run.

> --- /dev/null	2009-04-20 11:01:36.000000000 -0300
> +++ tests/swscale-regression.sh	2010-07-20 00:38:29.000000000 -0300
> @@ -0,0 +1,12 @@
> +#!/bin/sh
> +#
> +# automatic regression test for libswscale
> +#
> +#
> +#set -x

Do we really need to cargo-cult that around _all_ the scripts?

> +set -e
> +
> +. $(dirname $0)/regression-funcs.sh
> +
> +eval "$target_exec ${target_path}/libswscale/swscale-test" $test 2> /dev/null | bzip2 > $logfile.bz2

Why the eval and the quotes?  Just drop both.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list