From 89930744ed6921c5dfb0ffdfad2ca6059b2e6c6a Mon Sep 17 00:00:00 2001 From: Loren Merritt Date: Sat, 3 Mar 2007 12:12:54 +0000 Subject: [PATCH] cosmetics in regression test git-svn-id: svn://svn.videolan.org/x264/trunk@626 df754926-b1dd-0310-bc7b-ec298dee348c --- Makefile | 10 ++++++++-- tools/regression-test.pl | 14 ++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index c0045280..2b30f8be 100644 --- a/Makefile +++ b/Makefile @@ -112,7 +112,7 @@ ifeq (,$(VIDS)) fprofiled: @echo 'usage: make fprofiled VIDS="infile1 infile2 ..."' @echo 'where infiles are anything that x264 understands,' - @echo 'i.e. YUV with resolution in the filename, or avisynth.' + @echo 'i.e. YUV with resolution in the filename, y4m, or avisynth.' else fprofiled: $(MAKE) clean @@ -168,9 +168,15 @@ TAGS: dox: doxygen Doxyfile -# usage is same as for fprofiled +ifeq (,$(VIDS)) +test: + @echo 'usage: make test VIDS="infile1 infile2 ..."' + @echo 'where infiles are anything that x264 understands,' + @echo 'i.e. YUV with resolution in the filename, y4m, or avisynth.' +else test: perl tools/regression-test.pl --version=head,current --options='$(OPT0)' --options='$(OPT1)' --options='$(OPT2)' $(VIDS:%=--input=%) +endif testclean: rm -f test/*.log test/*.264 diff --git a/tools/regression-test.pl b/tools/regression-test.pl index 7c84b295..b9a4f14f 100644 --- a/tools/regression-test.pl +++ b/tools/regression-test.pl @@ -74,18 +74,16 @@ foreach my $version (@versions) print("building version: $version\n"); if ($version eq "current") { - system("./configure > build.log"); - system("make >> build.log 2>&1"); + system("(./configure && make) &> test/build.log"); mkpath("test/x264-$version"); if (! -e "x264") { print("build failed \n"); exit 1; } copy("x264", "test/x264-$version/x264"); chmod(0755, "test/x264-$version/x264"); next; } - system("svn checkout -$version svn://svn.videolan.org/x264/trunk/ test/x264-$version"); + system("svn checkout -$version svn://svn.videolan.org/x264/trunk/ test/x264-$version >/dev/null"); chdir("test/x264-$version"); - system("./configure > build.log"); - system("make >> build.log 2>&1"); + system("(./configure && make) &> build.log"); chdir("../.."); if (! -e "test/x264-$version/x264") { print("build failed \n"); exit 1; } } @@ -183,7 +181,7 @@ sub compare_logs # $is_diff = 1; #} - return $is_diff; + return $is_diff; # TODO compare frame by frame PSNR/SSIM, record improved or unimproved ranges #parse_log_frame_stats($log1); @@ -208,10 +206,10 @@ sub compare_raw264 if ($rawdata1 ne $rawdata2) { print("compressed files differ \n"); - return 1; + return 1; } - return 0; + return 0; } sub parse_log_frame_stats -- 2.47.3