Permalink
Browse files

perltidy run

  • Loading branch information...
1 parent e536a5d commit c5a72c9d71d6ef716fa54fcf4f61d17f9c1c23fa @adunstan adunstan committed Sep 25, 2012
Showing with 77 additions and 75 deletions.
  1. +1 −1 PGBuild/Modules/Skeleton.pm
  2. +26 −27 PGBuild/Modules/TestUpgrade.pm
  3. +4 −4 PGBuild/Options.pm
  4. +46 −43 run_build.pl
@@ -17,7 +17,7 @@ my $hooks = {
'need-run' => \&need_run,
'configure' => \&configure,
'build' => \&build,
- 'check' => \&check,
+ 'check' => \&check,
'install' => \&install,
'installcheck' => \&installcheck,
'cleanup' => \&cleanup,
@@ -12,14 +12,16 @@ use strict;
use vars qw($VERSION); $VERSION = 'REL_4.7';
my $hooks = {
-# 'checkout' => \&checkout,
-# 'setup-target' => \&setup_target,
-# 'need-run' => \&need_run,
-# 'configure' => \&configure,
-# 'build' => \&build,
-# 'install' => \&install,
+
+ # 'checkout' => \&checkout,
+ # 'setup-target' => \&setup_target,
+ # 'need-run' => \&need_run,
+ # 'configure' => \&configure,
+ # 'build' => \&build,
+ # 'install' => \&install,
'check' => \&check,
-# 'cleanup' => \&cleanup,
+
+ # 'cleanup' => \&cleanup,
};
sub setup
@@ -31,7 +33,7 @@ sub setup
my $conf = shift; # ref to the whole config object
my $pgsql = shift; # postgres build dir
- return unless ($branch eq 'HEAD' or $branch ge 'REL9_2');
+ return unless ($branch eq 'HEAD' or $branch ge 'REL9_2');
# could even set up several of these (e.g. for different branches)
my $self = {
@@ -51,38 +53,35 @@ sub check
{
my $self = shift;
-
- return unless main::step_wanted('pg_upgrade-check');
+ return unless main::step_wanted('pg_upgrade-check');
print main::time_str(), "checking pg_upgrade\n" if $verbose;
- my @checklog;
+ my @checklog;
- if ($self->{bfconf}->{using_msvc})
- {
+ if ($self->{bfconf}->{using_msvc})
+ {
chdir "$self->{pgsql}/src/tools/msvc";
@checklog = `perl vcregress.pl upgradecheck 2>&1`;
- chdir "$self->{buildroot}/$self->{pgbranch}";
- }
- else
- {
- my $cmd = "cd $self->{pgsql}/contrib/pg_upgrade && make check";
- @checklog = `$cmd 2>&1`;
- }
+ chdir "$self->{buildroot}/$self->{pgbranch}";
+ }
+ else
+ {
+ my $cmd = "cd $self->{pgsql}/contrib/pg_upgrade && make check";
+ @checklog = `$cmd 2>&1`;
+ }
- my $status = $? >>8;
+ my $status = $? >>8;
main::writelog("check-pg_upgrade",\@checklog);
print "======== pg_upgrade check log ===========\n",@checklog
if ($verbose > 1);
main::send_result("pg_upgradeCheck",$status,\@checklog) if $status;
- {
- no warnings 'once';
- $main::steps_completed .= " pg_upgradeCheck";
- }
-
+ {
+ no warnings 'once';
+ $main::steps_completed .= " pg_upgradeCheck";
+ }
}
-
1;
View
@@ -38,10 +38,10 @@ use vars qw($VERSION); $VERSION = 'REL_4.7';
@EXPORT_OK = ();
our (
- $forcerun, $buildconf, $keepall,
- $help, $quiet, $from_source,
- $from_source_clean, $testmode,$test_mode, $skip_steps,
- $only_steps, $find_typedefs,$nosend, $nostatus, $verbose,
+ $forcerun, $buildconf, $keepall,$help,
+ $quiet, $from_source,$from_source_clean, $testmode,
+ $test_mode, $skip_steps,$only_steps, $find_typedefs,
+ $nosend, $nostatus, $verbose,
);
my (%standard_options);
View
@@ -51,18 +51,21 @@
# save a copy of the original enviroment for reporting
# save it early to reduce the risk of prior mangling
use vars qw($orig_env);
-BEGIN
-{
- $orig_env = {};
- while (my ($k,$v) = each %ENV)
- {
- # report all the keys but only values for whitelisted settings
- # this is to stop leaking of things like passwords
- $orig_env->{$k} =
- ($k =~ /^PG(?!PASSWORD)|MAKE|CC|CPP|FLAG|LIBRAR|INCLUDE/
- ? $v
- : 'xxxxxx');
- }
+
+BEGIN
+{
+ $orig_env = {};
+ while (my ($k,$v) = each %ENV)
+ {
+
+ # report all the keys but only values for whitelisted settings
+ # this is to stop leaking of things like passwords
+ $orig_env->{$k} =(
+ $k =~ /^PG(?!PASSWORD)|MAKE|CC|CPP|FLAG|LIBRAR|INCLUDE/
+ ? $v
+ : 'xxxxxx'
+ );
+ }
}
use PGBuild::SCM;
@@ -138,7 +141,7 @@ BEGIN
$aux_path,$trigger_exclude,$trigger_include,$secret,
$keep_errs,$force_every, $make, $optional_steps,
$use_vpath,$tar_log_cmd, $using_msvc, $extra_config,
- $make_jobs
+ $make_jobs
)
=@PGBuild::conf{
qw(build_root target animal print_success aux_path trigger_exclude
@@ -661,8 +664,9 @@ END
process_module_hooks('installcheck', $locale);
- if (-d "$pgsql/src/test/isolation" && $locale eq 'C'
- && step_wanted('isolation-check'))
+ if ( -d "$pgsql/src/test/isolation"
+ && $locale eq 'C'
+ && step_wanted('isolation-check'))
{
# restart the db to clear the log file
@@ -680,7 +684,7 @@ END
# PLs so only check them for later versions
if (($branch eq 'HEAD' || $branch gt 'REL8_1')
- && step_wanted('pl-install-check'))
+ && step_wanted('pl-install-check'))
{
# restart the db to clear the log file
@@ -695,20 +699,20 @@ END
make_pl_install_check($locale);
}
- if (step_wanted('contrib-install-check'))
- {
+ if (step_wanted('contrib-install-check'))
+ {
- # restart the db to clear the log file
- print time_str(),"restarting db ($locale)...\n" if $verbose;
-
- stop_db($locale);
- start_db($locale);
-
- print time_str(),"running make contrib installcheck ($locale)...\n"
- if $verbose;
+ # restart the db to clear the log file
+ print time_str(),"restarting db ($locale)...\n" if $verbose;
- make_contrib_install_check($locale);
- }
+ stop_db($locale);
+ start_db($locale);
+
+ print time_str(),"running make contrib installcheck ($locale)...\n"
+ if $verbose;
+
+ make_contrib_install_check($locale);
+ }
print time_str(),"stopping db ($locale)...\n" if $verbose;
@@ -784,10 +788,10 @@ sub time_str
sub step_wanted
{
- my $step = shift;
- return $only_steps{$step} if $only_steps;
- return ! $skip_steps{$step} if $skip_steps;
- return 1; # default is everything is wanted
+ my $step = shift;
+ return $only_steps{$step} if $only_steps;
+ return !$skip_steps{$step} if $skip_steps;
+ return 1; # default is everything is wanted
}
sub register_module_hooks
@@ -888,14 +892,14 @@ sub check_make
sub make
{
return unless step_wanted('make');
- print time_str(),"running make ...\n" if $verbose;
+ print time_str(),"running make ...\n" if $verbose;
my (@makeout);
unless ($using_msvc)
{
- my $make_cmd = $make;
- $make_cmd = "$make -j $make_jobs"
- if ($make_jobs > 1 && ($branch eq 'HEAD' || $branch ge 'REL9_1'));
+ my $make_cmd = $make;
+ $make_cmd = "$make -j $make_jobs"
+ if ($make_jobs > 1 && ($branch eq 'HEAD' || $branch ge 'REL9_1'));
@makeout = `cd $pgsql && $make_cmd 2>&1`;
}
else
@@ -937,7 +941,7 @@ sub make_doc
sub make_install
{
return unless step_wanted('install');
- print time_str(),"running make install ...\n" if $verbose;
+ print time_str(),"running make install ...\n" if $verbose;
my @makeout;
unless ($using_msvc)
@@ -1003,9 +1007,9 @@ sub make_contrib
return unless step_wanted('make-contrib');
print time_str(),"running make contrib ...\n" if $verbose;
- my $make_cmd = $make;
- $make_cmd = "$make -j $make_jobs"
- if ($make_jobs > 1 && ($branch eq 'HEAD' || $branch ge 'REL9_1'));
+ my $make_cmd = $make;
+ $make_cmd = "$make -j $make_jobs"
+ if ($make_jobs > 1 && ($branch eq 'HEAD' || $branch ge 'REL9_1'));
my @makeout = `cd $pgsql/contrib && $make_cmd 2>&1`;
my $status = $? >>8;
writelog('make-contrib',\@makeout);
@@ -1020,7 +1024,6 @@ sub make_contrib_install
print time_str(),"running make contrib install ...\n"
if $verbose;
-
# part of install under msvc
my @makeout = `cd $pgsql/contrib && $make install 2>&1`;
my $status = $? >>8;
@@ -1356,7 +1359,7 @@ sub make_isolation_check
sub make_check
{
return unless step_wanted('check');
- print time_str(),"running make check ...\n" if $verbose;
+ print time_str(),"running make check ...\n" if $verbose;
my @makeout;
unless ($using_msvc)
@@ -1862,7 +1865,7 @@ sub get_script_config_dump
script_version => $VERSION,
invocation_args => \@invocation_args,
steps_completed => $steps_completed,
- orig_env => $orig_env,
+ orig_env => $orig_env,
};
delete $conf->{secret};
return Data::Dumper->Dump([$conf],['Script_Config']);

0 comments on commit c5a72c9

Please sign in to comment.