diff options
| author | Bruce Momjian | 2015-05-24 01:35:49 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2015-05-24 01:35:49 +0000 |
| commit | 807b9e0dff663c5da875af7907a5106c0ff90673 (patch) | |
| tree | 89a0cfbd3c9801dcb04aae4ccf2fee935092f958 /src/tools | |
| parent | 225892552bd3052982d2b97b749e5945ea71facc (diff) | |
pgindent run for 9.5
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Install.pm | 24 | ||||
| -rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 126 | ||||
| -rw-r--r-- | src/tools/msvc/Project.pm | 1 | ||||
| -rw-r--r-- | src/tools/msvc/Solution.pm | 19 | ||||
| -rw-r--r-- | src/tools/msvc/VCBuildProject.pm | 2 | ||||
| -rw-r--r-- | src/tools/msvc/VSObjectFactory.pm | 5 | ||||
| -rw-r--r-- | src/tools/msvc/config_default.pl | 34 | ||||
| -rw-r--r-- | src/tools/msvc/vcregress.pl | 42 |
8 files changed, 125 insertions, 128 deletions
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index b617835c0c5..b592f997f6c 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -306,6 +306,7 @@ sub CopySolutionOutput } else # 'StaticLibrary' { + # Static lib, such as libpgport, only used internally # during build, don't install. next; @@ -438,6 +439,7 @@ sub CopyContribFiles opendir($D, $subdir) || croak "Could not opendir on $subdir!\n"; while (my $d = readdir($D)) { + # These configuration-based exclusions must match vcregress.pl next if ($d eq "uuid-ossp" && !defined($config->{uuid})); next if ($d eq "sslinfo" && !defined($config->{openssl})); @@ -463,7 +465,7 @@ sub CopySubdirFiles return if ($module =~ /^\./); return unless (-f "$subdir/$module/Makefile"); return - if ($insttype eq "client" && !grep { $_ eq $module } @client_contribs); + if ($insttype eq "client" && !grep { $_ eq $module } @client_contribs); my $mf = read_file("$subdir/$module/Makefile"); $mf =~ s{\\\r?\n}{}g; @@ -480,18 +482,17 @@ sub CopySubdirFiles foreach my $f (split /\s+/, $flist) { - lcopy( - "$subdir/$module/$f.control", - "$target/share/extension/$f.control" - ) || croak("Could not copy file $f.control in contrib $module"); - print '.'; + lcopy("$subdir/$module/$f.control", + "$target/share/extension/$f.control") + || croak("Could not copy file $f.control in contrib $module"); + print '.'; } } $flist = ''; if ($mf =~ /^DATA_built\s*=\s*(.*)$/m) { $flist .= $1 } if ($mf =~ /^DATA\s*=\s*(.*)$/m) { $flist .= " $1" } - $flist =~ s/^\s*//; # Remove leading spaces if we had only DATA_built + $flist =~ s/^\s*//; # Remove leading spaces if we had only DATA_built if ($flist ne '') { @@ -500,9 +501,9 @@ sub CopySubdirFiles foreach my $f (split /\s+/, $flist) { lcopy("$subdir/$module/$f", - "$target/share/$moduledir/" . basename($f)) - || croak("Could not copy file $f in contrib $module"); - print '.'; + "$target/share/$moduledir/" . basename($f)) + || croak("Could not copy file $f in contrib $module"); + print '.'; } } @@ -533,8 +534,7 @@ sub CopySubdirFiles if ($module eq 'spi'); foreach my $f (split /\s+/, $flist) { - lcopy("$subdir/$module/$f", - "$target/doc/$moduledir/$f") + lcopy("$subdir/$module/$f", "$target/doc/$moduledir/$f") || croak("Could not copy file $f in contrib $module"); print '.'; } diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index be06898d1ae..0603130c580 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -30,33 +30,30 @@ my $libpq; # Set of variables for modules in contrib/ and src/test/modules/ my $contrib_defines = { 'refint' => 'REFINT_VERBOSE' }; -my @contrib_uselibpq = - ('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo'); -my @contrib_uselibpgport = ( - 'oid2name', - 'pg_standby', - 'vacuumlo'); -my @contrib_uselibpgcommon = ( - 'oid2name', - 'pg_standby', - 'vacuumlo'); -my $contrib_extralibs = undef; +my @contrib_uselibpq = ('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo'); +my @contrib_uselibpgport = ('oid2name', 'pg_standby', 'vacuumlo'); +my @contrib_uselibpgcommon = ('oid2name', 'pg_standby', 'vacuumlo'); +my $contrib_extralibs = undef; my $contrib_extraincludes = { 'tsearch2' => ['contrib/tsearch2'], 'dblink' => ['src/backend'] }; my $contrib_extrasource = { 'cube' => [ 'contrib/cube/cubescan.l', 'contrib/cube/cubeparse.y' ], - 'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], }; + 'seg' => [ 'contrib/seg/segscan.l', 'contrib/seg/segparse.y' ], }; my @contrib_excludes = ( - 'commit_ts', 'hstore_plperl', - 'hstore_plpython', 'intagg', - 'ltree_plpython', 'pgcrypto', - 'sepgsql'); + 'commit_ts', 'hstore_plperl', 'hstore_plpython', 'intagg', + 'ltree_plpython', 'pgcrypto', 'sepgsql'); # Set of variables for frontend modules my $frontend_defines = { 'initdb' => 'FRONTEND' }; my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql'); -my @frontend_uselibpgport = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' ); -my @frontend_uselibpgcommon = ( 'pg_archivecleanup', 'pg_test_fsync', 'pg_test_timing', 'pg_upgrade', 'pg_xlogdump', 'pgbench' ); +my @frontend_uselibpgport = ( + 'pg_archivecleanup', 'pg_test_fsync', + 'pg_test_timing', 'pg_upgrade', + 'pg_xlogdump', 'pgbench'); +my @frontend_uselibpgcommon = ( + 'pg_archivecleanup', 'pg_test_fsync', + 'pg_test_timing', 'pg_upgrade', + 'pg_xlogdump', 'pgbench'); my $frontend_extralibs = { 'initdb' => ['ws2_32.lib'], 'pg_restore' => ['ws2_32.lib'], @@ -68,10 +65,10 @@ my $frontend_extraincludes = { my $frontend_extrasource = { 'psql' => ['src/bin/psql/psqlscan.l'], 'pgbench' => - [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ], -}; -my @frontend_excludes = - ('pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', 'pg_xlogdump', 'scripts'); + [ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ], }; +my @frontend_excludes = ( + 'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump', + 'pg_xlogdump', 'scripts'); sub mkvcbuild { @@ -104,15 +101,16 @@ sub mkvcbuild } else { - push(@pgportfiles, 'pg_crc32c_sb8.c') + push(@pgportfiles, 'pg_crc32c_sb8.c'); } our @pgcommonallfiles = qw( exec.c pg_lzcompress.c pgfnames.c psprintf.c relpath.c rmtree.c string.c username.c wait_error.c); - our @pgcommonfrontendfiles = (@pgcommonallfiles, qw(fe_memutils.c - restricted_token.c)); + our @pgcommonfrontendfiles = ( + @pgcommonallfiles, qw(fe_memutils.c + restricted_token.c)); our @pgcommonbkndfiles = @pgcommonallfiles; @@ -467,15 +465,16 @@ sub mkvcbuild # ltree_plpython and hstore_plperl. if ($solution->{options}->{python}) { + # Attempt to get python version and location. # Assume python.exe in specified dir. - my $pythonprog = "import sys;print(sys.prefix);" . - "print(str(sys.version_info[0])+str(sys.version_info[1]))"; - my $prefixcmd = $solution->{options}->{python} - . "\\python -c \"$pythonprog\""; + my $pythonprog = "import sys;print(sys.prefix);" + . "print(str(sys.version_info[0])+str(sys.version_info[1]))"; + my $prefixcmd = + $solution->{options}->{python} . "\\python -c \"$pythonprog\""; my $pyout = `$prefixcmd`; die "Could not query for python version!\n" if $?; - my ($pyprefix,$pyver) = split(/\r?\n/,$pyout); + my ($pyprefix, $pyver) = split(/\r?\n/, $pyout); # Sometimes (always?) if python is not present, the execution # appears to work, but gives no data... @@ -490,16 +489,14 @@ sub mkvcbuild $plpython->AddReference($postgres); # Add transform modules dependent on plpython - AddTransformModule('hstore_plpython' . $pymajorver, - 'contrib/hstore_plpython', - 'plpython' . $pymajorver, - 'src/pl/plpython', 'hstore', - 'contrib/hstore'); - AddTransformModule('ltree_plpython' . $pymajorver, - 'contrib/ltree_plpython', - 'plpython' . $pymajorver, - 'src/pl/plpython', 'ltree', - 'contrib/ltree'); + AddTransformModule( + 'hstore_plpython' . $pymajorver, 'contrib/hstore_plpython', + 'plpython' . $pymajorver, 'src/pl/plpython', + 'hstore', 'contrib/hstore'); + AddTransformModule( + 'ltree_plpython' . $pymajorver, 'contrib/ltree_plpython', + 'plpython' . $pymajorver, 'src/pl/plpython', + 'ltree', 'contrib/ltree'); } if ($solution->{options}->{perl}) @@ -587,10 +584,10 @@ sub mkvcbuild } # Add transform module dependent on plperl - my $hstore_plperl = - AddTransformModule('hstore_plperl', 'contrib/hstore_plperl', - 'plperl', 'src/pl/plperl', - 'hstore', 'contrib/hstore'); + my $hstore_plperl = AddTransformModule( + 'hstore_plperl', 'contrib/hstore_plperl', + 'plperl', 'src/pl/plperl', + 'hstore', 'contrib/hstore'); $hstore_plperl->AddDefine('PLPERL_HAVE_UID_GID'); } @@ -670,7 +667,7 @@ sub mkvcbuild $pg_xlogdump->AddDefine('FRONTEND'); foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c')) { - $pg_xlogdump->AddFile($xf) + $pg_xlogdump->AddFile($xf); } $pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c'); @@ -706,12 +703,12 @@ sub AddSimpleFrontend # Add a simple transform module sub AddTransformModule { - my $n = shift; - my $n_src = shift; - my $pl_proj_name = shift; - my $pl_src = shift; + my $n = shift; + my $n_src = shift; + my $pl_proj_name = shift; + my $pl_src = shift; my $transform_name = shift; - my $transform_src = shift; + my $transform_src = shift; my $transform_proj = undef; foreach my $proj (@{ $solution->{projects}->{'contrib'} }) @@ -723,7 +720,7 @@ sub AddTransformModule } } die "could not find base module $transform_name for transform module $n" - if (!defined($transform_proj)); + if (!defined($transform_proj)); my $pl_proj = undef; foreach my $proj (@{ $solution->{projects}->{'PLs'} }) @@ -735,7 +732,7 @@ sub AddTransformModule } } die "could not find PL $pl_proj_name for transform module $n" - if (!defined($pl_proj)); + if (!defined($pl_proj)); my $p = $solution->AddProject($n, 'dll', 'contrib', $n_src); for my $file (glob("$n_src/*.c")) @@ -748,7 +745,7 @@ sub AddTransformModule $p->AddIncludeDir($pl_src); $p->AddReference($pl_proj); $p->AddIncludeDir($pl_proj->{includes}); - foreach my $pl_lib (@{$pl_proj->{libraries}}) + foreach my $pl_lib (@{ $pl_proj->{libraries} }) { $p->AddLibrary($pl_lib); } @@ -756,7 +753,7 @@ sub AddTransformModule # Add base module dependencies $p->AddIncludeDir($transform_src); $p->AddIncludeDir($transform_proj->{includes}); - foreach my $trans_lib (@{$transform_proj->{libraries}}) + foreach my $trans_lib (@{ $transform_proj->{libraries} }) { $p->AddLibrary($trans_lib); } @@ -769,14 +766,13 @@ sub AddTransformModule sub AddContrib { my $subdir = shift; - my $n = shift; - my $mf = Project::read_file("$subdir/$n/Makefile"); + my $n = shift; + my $mf = Project::read_file("$subdir/$n/Makefile"); if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg) { my $dn = $1; - my $proj = - $solution->AddProject($dn, 'dll', 'contrib', "$subdir/$n"); + my $proj = $solution->AddProject($dn, 'dll', 'contrib', "$subdir/$n"); $proj->AddReference($postgres); AdjustContribProj($proj); } @@ -794,8 +790,7 @@ sub AddContrib } elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg) { - my $proj = - $solution->AddProject($1, 'exe', 'contrib', "$subdir/$n"); + my $proj = $solution->AddProject($1, 'exe', 'contrib', "$subdir/$n"); AdjustContribProj($proj); } else @@ -841,7 +836,7 @@ sub GenerateContribSqlFiles print "Building $out from $in (contrib/$n)...\n"; my $cont = Project::read_file("contrib/$n/$in"); my $dn = $out; - $dn =~ s/\.sql$//; + $dn =~ s/\.sql$//; $cont =~ s/MODULE_PATHNAME/\$libdir\/$dn/g; my $o; open($o, ">contrib/$n/$out") @@ -866,10 +861,11 @@ sub AdjustContribProj sub AdjustFrontendProj { my $proj = shift; - AdjustModule($proj, $frontend_defines, \@frontend_uselibpq, - \@frontend_uselibpgport, \@frontend_uselibpgcommon, - $frontend_extralibs, - $frontend_extrasource, $frontend_extraincludes); + AdjustModule( + $proj, $frontend_defines, + \@frontend_uselibpq, \@frontend_uselibpgport, + \@frontend_uselibpgcommon, $frontend_extralibs, + $frontend_extrasource, $frontend_extraincludes); } sub AdjustModule diff --git a/src/tools/msvc/Project.pm b/src/tools/msvc/Project.pm index 362beb4218a..4ce09418537 100644 --- a/src/tools/msvc/Project.pm +++ b/src/tools/msvc/Project.pm @@ -63,6 +63,7 @@ sub ReplaceFile foreach my $file (keys %{ $self->{files} }) { + # Match complete filename if ($filename =~ m!/!) { diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index db95afa14ba..6b16e69b690 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -36,7 +36,7 @@ sub _new $options->{float8byval} = ($bits == 64) unless exists $options->{float8byval}; die "float8byval not permitted on 32 bit platforms" - if $options->{float8byval} && $bits == 32; + if $options->{float8byval} && $bits == 32; if ($options->{xml}) { if (!($options->{xslt} && $options->{iconv})) @@ -143,16 +143,13 @@ sub GenerateFiles confess "Unable to parse configure.in for all variables!" if ($self->{strver} eq '' || $self->{numver} eq ''); - if (IsNewer( - "src/include/pg_config_os.h", "src/include/port/win32.h")) + if (IsNewer("src/include/pg_config_os.h", "src/include/port/win32.h")) { print "Copying pg_config_os.h...\n"; - copyFile("src/include/port/win32.h", - "src/include/pg_config_os.h"); + copyFile("src/include/port/win32.h", "src/include/pg_config_os.h"); } - if (IsNewer( - "src/include/pg_config.h", "src/include/pg_config.h.win32")) + if (IsNewer("src/include/pg_config.h", "src/include/pg_config.h.win32")) { print "Generating pg_config.h...\n"; open(I, "src/include/pg_config.h.win32") @@ -165,7 +162,7 @@ sub GenerateFiles { s{PG_VERSION "[^"]+"}{PG_VERSION "$self->{strver}$extraver"}; s{PG_VERSION_NUM \d+}{PG_VERSION_NUM $self->{numver}}; - s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY(z)\n#define PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " __STRINGIFY2(_MSC_VER) ", $bits-bit"}; +s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY(z)\n#define PG_VERSION_STR "PostgreSQL $self->{strver}$extraver, compiled by Visual C++ build " __STRINGIFY2(_MSC_VER) ", $bits-bit"}; print O; } print O "#define PG_MAJORVERSION \"$self->{majorver}\"\n"; @@ -177,10 +174,10 @@ sub GenerateFiles if ($self->{options}->{asserts}); print O "#define USE_INTEGER_DATETIMES 1\n" if ($self->{options}->{integer_datetimes}); - print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap}); - print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib}); + print O "#define USE_LDAP 1\n" if ($self->{options}->{ldap}); + print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib}); print O "#define USE_OPENSSL 1\n" if ($self->{options}->{openssl}); - print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls}); + print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls}); print O "#define BLCKSZ ", 1024 * $self->{options}->{blocksize}, "\n"; print O "#define RELSEG_SIZE ", diff --git a/src/tools/msvc/VCBuildProject.pm b/src/tools/msvc/VCBuildProject.pm index 3a24c4e52fa..a8d75d88f31 100644 --- a/src/tools/msvc/VCBuildProject.pm +++ b/src/tools/msvc/VCBuildProject.pm @@ -112,7 +112,7 @@ EOF my $of = $fileNameWithPath; $of =~ s/\.y$/.c/; $of =~ -s{^src/pl/plpgsql/src/gram.c$}{src/pl/plpgsql/src/pl_gram.c}; + s{^src/pl/plpgsql/src/gram.c$}{src/pl/plpgsql/src/pl_gram.c}; print $f '>' . $self->GenerateCustomTool( 'Running bison on ' . $fileNameWithPath, diff --git a/src/tools/msvc/VSObjectFactory.pm b/src/tools/msvc/VSObjectFactory.pm index b83af4026eb..fee4684b21d 100644 --- a/src/tools/msvc/VSObjectFactory.pm +++ b/src/tools/msvc/VSObjectFactory.pm @@ -92,11 +92,14 @@ sub CreateProject sub DetermineVisualStudioVersion { + # To determine version of Visual Studio we use nmake as it has # existed for a long time and still exists in current Visual # Studio versions. my $output = `nmake /? 2>&1`; - $? >> 8 == 0 or croak "Unable to determine Visual Studio version: The nmake command wasn't found."; + $? >> 8 == 0 + or croak +"Unable to determine Visual Studio version: The nmake command wasn't found."; if ($output =~ /(\d+)\.(\d+)\.\d+(\.\d+)?$/m) { return _GetVisualStudioVersion($1, $2); diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 0bee0c0e2d9..b9f2ff41f73 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -7,24 +7,24 @@ our $config = { # integer_datetimes=>1, # --enable-integer-datetimes - on is now default # float4byval=>1, # --disable-float4-byval, on by default - # float8byval=> $platformbits == 64, # --disable-float8-byval, - # off by default on 32 bit platforms, on by default on 64 bit platforms + # float8byval=> $platformbits == 64, # --disable-float8-byval, + # off by default on 32 bit platforms, on by default on 64 bit platforms - # blocksize => 8, # --with-blocksize, 8kB by default - # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default - # wal_segsize => 16, # --with-wal-segsize, 16MB by default - ldap => 1, # --with-ldap - extraver => undef, # --with-extra-version=<string> - nls => undef, # --enable-nls=<path> - tcl => undef, # --with-tls=<path> - perl => undef, # --with-perl - python => undef, # --with-python=<path> - openssl => undef, # --with-openssl=<path> - uuid => undef, # --with-ossp-uuid - xml => undef, # --with-libxml=<path> - xslt => undef, # --with-libxslt=<path> - iconv => undef, # (not in configure, path to iconv) - zlib => undef # --with-zlib=<path> + # blocksize => 8, # --with-blocksize, 8kB by default + # wal_blocksize => 8, # --with-wal-blocksize, 8kB by default + # wal_segsize => 16, # --with-wal-segsize, 16MB by default + ldap => 1, # --with-ldap + extraver => undef, # --with-extra-version=<string> + nls => undef, # --enable-nls=<path> + tcl => undef, # --with-tls=<path> + perl => undef, # --with-perl + python => undef, # --with-python=<path> + openssl => undef, # --with-openssl=<path> + uuid => undef, # --with-ossp-uuid + xml => undef, # --with-libxml=<path> + xslt => undef, # --with-libxslt=<path> + iconv => undef, # (not in configure, path to iconv) + zlib => undef # --with-zlib=<path> }; 1; diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index bfa8a3dc909..ddb628d1545 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -15,7 +15,7 @@ my $startdir = getcwd(); chdir "../../.." if (-d "../../../src/tools/msvc"); -my $topdir = getcwd(); +my $topdir = getcwd(); my $tmp_installdir = "$topdir/tmp_install"; require 'src/tools/msvc/config_default.pl'; @@ -230,11 +230,11 @@ sub subdircheck { my $subdir = shift; my $module = shift; - my $mstat = 0; + my $mstat = 0; - if ( ! -d "$module/sql" || - ! -d "$module/expected" || - ( ! -f "$module/GNUmakefile" && ! -f "$module/Makefile")) + if ( !-d "$module/sql" + || !-d "$module/expected" + || (!-f "$module/GNUmakefile" && !-f "$module/Makefile")) { return; } @@ -246,19 +246,17 @@ sub subdircheck # Add some options for transform modules, see their respective # Makefile for more details regarding Python-version specific # dependencies. - if ($module eq "hstore_plpython" || - $module eq "ltree_plpython") + if ( $module eq "hstore_plpython" + || $module eq "ltree_plpython") { die "Python not enabled in configuration" - if !defined($config->{python}); + if !defined($config->{python}); # Attempt to get python version and location. # Assume python.exe in specified dir. - my $pythonprog = "import sys;" . - "print(str(sys.version_info[0]))"; - my $prefixcmd = $config->{python} - . "\\python -c \"$pythonprog\""; - my $pyver = `$prefixcmd`; + my $pythonprog = "import sys;" . "print(str(sys.version_info[0]))"; + my $prefixcmd = $config->{python} . "\\python -c \"$pythonprog\""; + my $pyver = `$prefixcmd`; die "Could not query for python version!\n" if $?; chomp($pyver); if ($pyver eq "2") @@ -268,6 +266,7 @@ sub subdircheck } else { + # disable tests on python3 for now. chdir ".."; return; @@ -275,10 +274,9 @@ sub subdircheck } - print - "============================================================\n"; + print "============================================================\n"; print "Checking $module\n"; - my @args = ( + my @args = ( "${tmp_installdir}/bin/pg_regress", "--bindir=${tmp_installdir}/bin", "--dbname=contrib_regression", @opts, @tests); @@ -295,11 +293,12 @@ sub contribcheck chdir "$topdir/contrib"; foreach my $module (glob("*")) { + # these configuration-based exclusions must match Install.pm - next if ($module eq "uuid-ossp" && !defined($config->{uuid})); - next if ($module eq "sslinfo" && !defined($config->{openssl})); - next if ($module eq "xml2" && !defined($config->{xml})); - next if ($module eq "hstore_plperl" && !defined($config->{perl})); + next if ($module eq "uuid-ossp" && !defined($config->{uuid})); + next if ($module eq "sslinfo" && !defined($config->{openssl})); + next if ($module eq "xml2" && !defined($config->{xml})); + next if ($module eq "hstore_plperl" && !defined($config->{perl})); next if ($module eq "hstore_plpython" && !defined($config->{python})); next if ($module eq "ltree_plpython" && !defined($config->{python})); next if ($module eq "sepgsql"); @@ -412,6 +411,7 @@ sub fetchRegressOpts $m =~ s{\\\r?\n}{}g; if ($m =~ /^\s*REGRESS_OPTS\s*\+?=(.*)/m) { + # Substitute known Makefile variables, then ignore options that retain # an unhandled variable reference. Ignore anything that isn't an # option starting with "--". @@ -492,6 +492,6 @@ sub usage { print STDERR "Usage: vcregress.pl ", - "<check|installcheck|plcheck|contribcheck|isolationcheck|ecpgcheck|upgradecheck> [schedule]\n"; +"<check|installcheck|plcheck|contribcheck|isolationcheck|ecpgcheck|upgradecheck> [schedule]\n"; exit(1); } |
