Navigation Menu

Skip to content

Commit

Permalink
perltidy run
Browse files Browse the repository at this point in the history
  • Loading branch information
adunstan committed Jun 12, 2017
1 parent f0aabf8 commit 5762200
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 91 deletions.
3 changes: 1 addition & 2 deletions PGBuild/Modules/FileTextArrayFDW.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::FileTextArrayFDW;

use PGBuild::Options;
Expand Down Expand Up @@ -182,7 +181,7 @@ sub installcheck
{
my $self = shift;
my $locale = shift;
my $make = $self->{bfconf}->{make};
my $make = $self->{bfconf}->{make};

print main::time_str(), "install-checking $MODULE\n" if $verbose;

Expand Down
1 change: 0 additions & 1 deletion PGBuild/Modules/Skeleton.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::Skeleton;

use PGBuild::Options;
Expand Down
1 change: 0 additions & 1 deletion PGBuild/Modules/TestCollateLinuxUTF8.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::TestCollateLinuxUTF8;

use PGBuild::Options;
Expand Down
12 changes: 6 additions & 6 deletions PGBuild/Modules/TestDecoding.pm
@@ -1,7 +1,6 @@

package PGBuild::Modules::TestDecoding;


=comment
Copyright (c) 2003-2017, Andrew Dunstan
Expand Down Expand Up @@ -70,11 +69,12 @@ sub check
}
else
{
my $instflags = $main::temp_installs >= 3
? "NO_TEMP_INSTALL=$main::temp_installs"
: "";
my $cmd =
"cd $self->{pgsql}/contrib/test_decoding && $make $instflags check";
my $instflags =
$main::temp_installs >= 3
? "NO_TEMP_INSTALL=$main::temp_installs"
: "";
my $cmd =
"cd $self->{pgsql}/contrib/test_decoding && $make $instflags check";
@checklog = run_log($cmd);
}

Expand Down
1 change: 0 additions & 1 deletion PGBuild/Modules/TestICU.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::TestICU;

use PGBuild::Options;
Expand Down
11 changes: 5 additions & 6 deletions PGBuild/Modules/TestSepgsql.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::TestSepgsql;

use PGBuild::Options;
Expand Down Expand Up @@ -204,13 +203,13 @@ sub locale_end
push(@log,"============= sepgsql tests ============\n",@testlog);
$status = $? >>8;

if ( -e "$pgsql/contrib/sepgsql/regression.diffs" )
{
open(my $dhandle,"$pgsql/contrib/sepgsql/regression.diffs");
push(@log,"================== regression.diffs ===============\n");
if ( -e "$pgsql/contrib/sepgsql/regression.diffs" )
{
open(my $dhandle,"$pgsql/contrib/sepgsql/regression.diffs");
push(@log,"================== regression.diffs ===============\n");
push(@log,$_) while (<$dhandle>);
close($dhandle);
}
}

if ($status)
{
Expand Down
15 changes: 7 additions & 8 deletions PGBuild/Modules/TestUpgrade.pm
Expand Up @@ -10,7 +10,6 @@ See accompanying License file for license details
=cut


package PGBuild::Modules::TestUpgrade;

use PGBuild::Options;
Expand Down Expand Up @@ -92,20 +91,20 @@ sub check
else
{
my $cmd;
my $instflags;
{
no warnings qw(once);
$instflags = $main::temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";
}
my $instflags;
{
no warnings qw(once);
$instflags = $main::temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";
}
if ($self->{pgbranch} eq 'HEAD' || $self->{pgbranch} ge 'REL9_5')
{
$cmd =
"cd $self->{pgsql}/src/bin/pg_upgrade && $make $instflags check";
"cd $self->{pgsql}/src/bin/pg_upgrade && $make $instflags check";
}
else
{
$cmd =
"cd $self->{pgsql}/contrib/pg_upgrade && $make $instflags check";
"cd $self->{pgsql}/contrib/pg_upgrade && $make $instflags check";
}
@checklog = run_log($cmd);
}
Expand Down
36 changes: 18 additions & 18 deletions PGBuild/Utils.pm
Expand Up @@ -32,31 +32,31 @@ use vars qw($VERSION); $VERSION = 'REL_4.19';

sub run_log
{
no warnings qw(once);
no warnings qw(once);

my $command = shift;
my $filedir = "$main::branch_root/$main::st_prefix$main::logdirname";
mkpath($filedir);
my $file= "$filedir/lastcomand.log";
my $filedir = "$main::branch_root/$main::st_prefix$main::logdirname";
mkpath($filedir);
my $file= "$filedir/lastcomand.log";
unlink $file;

if ($Config{osname} eq 'MSWin32')
{
# can't use more robust Unix shell syntax with DOS shell
system("$command >$file 2>&1");
}
elsif ($ENV{BF_LOG_TIME} && -x "/usr/bin/ts")
{
system("{ $command;} 2>&1 | /usr/bin/ts > $file");
}
else
{
system("{ $command;} > $file 2>&1");
}
if ($Config{osname} eq 'MSWin32')
{
# can't use more robust Unix shell syntax with DOS shell
system("$command >$file 2>&1");
}
elsif ($ENV{BF_LOG_TIME} && -x "/usr/bin/ts")
{
system("{ $command;} 2>&1 | /usr/bin/ts > $file");
}
else
{
system("{ $command;} > $file 2>&1");
}
my @loglines;
if (-e $file)
{
# shouldn't fail, but I've seen it, so die if it does
# shouldn't fail, but I've seen it, so die if it does
open(my $handle,$file) || die "opening $file for $command: $!";
@loglines = <$handle>;
close $handle;
Expand Down
10 changes: 5 additions & 5 deletions build-farm.conf.sample
Expand Up @@ -343,11 +343,11 @@ if ($branch eq 'HEAD')
# push(@{$conf{config_opts}},"--enable-depend");
# Note that config_opts is a hashref for MSVC, rather than
# an arrayref like elsewhere. That means the right way to set
# semething there is like this:
#
# $conf{config_opts}->{openssl} = 'c:\path\to\openssl\installation';
# Note that config_opts is a hashref for MSVC, rather than
# an arrayref like elsewhere. That means the right way to set
# semething there is like this:
#
# $conf{config_opts}->{openssl} = 'c:\path\to\openssl\installation';
}
elsif ($branch =~ /^REL7_/)
{
Expand Down
88 changes: 45 additions & 43 deletions run_build.pl
Expand Up @@ -1169,16 +1169,16 @@ sub make_contrib_install
if $verbose;

# part of install under msvc
my $tmp_inst = abs_path($pgsql) . "/tmp_install";
my $cmd =
"cd $pgsql/contrib && $make install && $make DESTDIR=$tmp_inst install";
my @makeout = run_log($cmd);
my $tmp_inst = abs_path($pgsql) . "/tmp_install";
my $cmd =
"cd $pgsql/contrib && $make install && $make DESTDIR=$tmp_inst install";
my @makeout = run_log($cmd);
my $status = $? >>8;
writelog('install-contrib',\@makeout);
print "======== make contrib install log ===========\n",@makeout
if ($verbose > 1);
send_result('ContribInstall',$status,\@makeout) if $status;
$temp_installs++;
$temp_installs++;
$steps_completed .= " ContribInstall";
}

Expand All @@ -1190,16 +1190,16 @@ sub make_testmodules_install
print time_str(),"running make testmodules install ...\n"
if $verbose;

my $tmp_inst = abs_path($pgsql) . "/tmp_install";
my $cmd = "cd $pgsql/src/test/modules && " .
"$make install && $make DESTDIR=$tmp_inst install";
my @makeout = run_log($cmd);
my $tmp_inst = abs_path($pgsql) . "/tmp_install";
my $cmd = "cd $pgsql/src/test/modules && "
."$make install && $make DESTDIR=$tmp_inst install";
my @makeout = run_log($cmd);
my $status = $? >>8;
writelog('install-testmodules',\@makeout);
print "======== make testmodules install log ===========\n",@makeout
if ($verbose > 1);
send_result('TestModulesInstall',$status,\@makeout) if $status;
$temp_installs++;
$temp_installs++;
$steps_completed .= " TestModulesInstall";
}

Expand Down Expand Up @@ -1606,22 +1606,22 @@ sub run_tap_test

my @makeout;

my $pflags = "PROVE_FLAGS=--timer";
my $pflags = "PROVE_FLAGS=--timer";

if ($using_msvc)
{
my $test = substr($dir,length("$pgsql/"));
if ($using_msvc)
{
my $test = substr($dir,length("$pgsql/"));
chdir "$pgsql/src/tools/msvc";
@makeout = run_log("perl vcregress.pl taptest $pflags $test");
chdir $branch_root;
}
else
{
my $instflags = $temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";
}
else
{
my $instflags = $temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";

@makeout =
run_log("cd $dir && $make NO_LOCALE=1 $pflags $instflags $target");
}
@makeout =
run_log("cd $dir && $make NO_LOCALE=1 $pflags $instflags $target");
}

my $status = $? >>8;

Expand Down Expand Up @@ -1675,11 +1675,11 @@ sub make_bin_installcheck

my @makeout;

foreach my $bin (glob("$pgsql/src/bin/*"))
{
next unless -d "$bin/t";
run_tap_test($bin, basename($bin), undef);
}
foreach my $bin (glob("$pgsql/src/bin/*"))
{
next unless -d "$bin/t";
run_tap_test($bin, basename($bin), undef);
}
}

sub run_misc_tests
Expand All @@ -1703,11 +1703,13 @@ sub run_misc_tests

my @makeout;

foreach my $test (qw(recovery subscription authentication))
{
next unless -d "$pgsql/src/test/$test/t";
run_tap_test("$pgsql/src/test/$test", $test, undef)
}
foreach my $test (qw(recovery subscription authentication))
{
next unless -d "$pgsql/src/test/$test/t";
run_tap_test(
"$pgsql/src/test/$test", $test, undef
);
}
}

sub make_check
Expand Down Expand Up @@ -1766,12 +1768,12 @@ sub make_check
if ($verbose > 1);

send_result('Check',$status,\@makeout) if $status;
$temp_installs++;
if ($using_msvc)
{
# MSVC installs everything, so we now have a complete temp install
$ENV{NO_TEMP_INSTALL} = "yes";
}
$temp_installs++;
if ($using_msvc)
{
# MSVC installs everything, so we now have a complete temp install
$ENV{NO_TEMP_INSTALL} = "yes";
}
$steps_completed .= " Check";
}

Expand All @@ -1788,9 +1790,9 @@ sub make_ecpg_check
}
else
{
my $instflags = $temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";
@makeout =
run_log("cd $ecpg_dir && $make NO_LOCALE=1 $instflags check");
my $instflags = $temp_installs >= 3 ? "NO_TEMP_INSTALL=yes" : "";
@makeout =
run_log("cd $ecpg_dir && $make NO_LOCALE=1 $instflags check");
}
my $status = $? >>8;

Expand Down Expand Up @@ -2288,10 +2290,10 @@ sub get_config_summary
my $handle;
my $config = "";

# if configure bugs out there might not be a log file at all
# in that case just return the rest of the summary.
# if configure bugs out there might not be a log file at all
# in that case just return the rest of the summary.

unless ($using_msvc || ! -e "$pgsql/config.log" )
unless ($using_msvc || !-e "$pgsql/config.log" )
{
open($handle,"$pgsql/config.log") || return undef;
my $start = undef;
Expand Down

0 comments on commit 5762200

Please sign in to comment.