From 19eba652c15b624bf45a3532285d6e1d212ff8de Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Tue, 18 Aug 2009 22:36:56 +0000 Subject: [PATCH] Pick up REGRESS_OPTS from contrib makefiles. Along the way, fix ordering of makefile tests to mimic gmake. --- src/tools/msvc/vcregress.pl | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 5fc60dac8e..cf0edfdc74 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -180,15 +180,16 @@ sub contribcheck { next unless -d "$module/sql" && -d "$module/expected" && - (-f "$module/Makefile" || -f "$module/GNUmakefile"); + (-f "$module/GNUmakefile" || -f "$module/Makefile"); chdir $module; print "============================================================\n"; print "Checking $module\n"; my @tests = fetchTests(); + my @opts = fetchRegressOpts(); my @args = ( "../../$Config/pg_regress/pg_regress", "--psqldir=../../$Config/psql", - "--dbname=contrib_regression",@tests + "--dbname=contrib_regression",@opts,@tests ); system(@args); my $status = $? >> 8; @@ -198,12 +199,31 @@ sub contribcheck exit $mstat if $mstat; } +sub fetchRegressOpts +{ + my $handle; + open($handle,"; + close($handle); + my @opts; + if ($m =~ /^\s*REGRESS_OPTS\s*=(.*)/m) + { + # ignore options that use makefile variables - can't handle those + # ignore anything that isn't an option staring with -- + @opts = grep { $_ !~ /\$\(/ && $_ =~ /^--/ } split(/\s+/,$1); + } + return @opts; +} + sub fetchTests { my $handle; - open($handle,"; -- 2.39.5