[Collab-qa-commits] r1206 - buildstat/trunk/buildstat-job-manager

goneri at alioth.debian.org goneri at alioth.debian.org
Wed Sep 3 21:11:31 UTC 2008


Author: goneri
Date: 2008-09-03 21:11:30 +0000 (Wed, 03 Sep 2008)
New Revision: 1206

Modified:
   buildstat/trunk/buildstat-job-manager/buildstat-job-manager
Log:
indent

Modified: buildstat/trunk/buildstat-job-manager/buildstat-job-manager
===================================================================
--- buildstat/trunk/buildstat-job-manager/buildstat-job-manager	2008-09-03 21:11:15 UTC (rev 1205)
+++ buildstat/trunk/buildstat-job-manager/buildstat-job-manager	2008-09-03 21:11:30 UTC (rev 1206)
@@ -25,18 +25,18 @@
 #$dscuri =~ s/\@DEB_MIRROR\@/http:\/\/ftp.fr.debian.org\/debian/;
 
 my $params = {
-   action => undef,
-   qatool => undef,
-   jobfile => undef,
-   logfile => undef,
-   result => undef,
-   target => undef,
-   help => undef
+    action => undef,
+    qatool => undef,
+    jobfile => undef,
+    logfile => undef,
+    result => undef,
+    target => undef,
+    help => undef
 };
 
 sub postFiles {
     my $files = shift;
-    
+
     die "File not found" unless -f $files->{'jobfile'} || -f $files->{'resultfile'};
     my $ua = new LWP::UserAgent;
     $ua->env_proxy;
@@ -89,30 +89,30 @@
 sub getJob {
     die unless $params->{'qatool'} && $params->{'jobfile'} && $params->{'target'};
 
-  my $ua  = LWP::UserAgent->new();
-  $ua->env_proxy;
-  my $req = POST $server."/controls/getQAJob", Content_Type => 'form-data',
-  Content      => [
-  submit => 1,
-  content => "qatool=".$params->{'qatool'}."\ntarget=".$params->{'target'},
-  ];
-  my $response = $ua->request($req);
-  die "Failed to contact server" unless $response->is_success();
+    my $ua  = LWP::UserAgent->new();
+    $ua->env_proxy;
+    my $req = POST $server."/controls/getQAJob", Content_Type => 'form-data',
+    Content      => [
+    submit => 1,
+    content => "qatool=".$params->{'qatool'}."\ntarget=".$params->{'target'},
+    ];
+    my $response = $ua->request($req);
+    die "Failed to contact server" unless $response->is_success();
 
-  open JOBFILE, ">".$params->{'jobfile'} or die "Can't open ".$params->{'jobfile'}.":$!\n";
-  print JOBFILE $response->content;
-  close JOBFILE;
+    open JOBFILE, ">".$params->{'jobfile'} or die "Can't open ".$params->{'jobfile'}.":$!\n";
+    print JOBFILE $response->content;
+    close JOBFILE;
 }
 
 
 sub sendJob {
 
-  my ($report, $threadbuildarea) = @_;
+    my ($report, $threadbuildarea) = @_;
 
-  print "sending result\n";
+    print "sending result\n";
 
-  $report->{'admin'} = $admin;
-  $report->{hostname} = $hostname;
+    $report->{'admin'} = $admin;
+    $report->{hostname} = $hostname;
 
 
 #  open (BUILDLOGTMP, "<","$threadbuildarea/build.log.tmp") or die;
@@ -120,7 +120,7 @@
 #  open (BUILDLOG, ">", "$threadbuildarea/".$logfile) or die;
 #  # If I'm not at the end of BUILDLOGTMP it means that seek moved me
 #  print BUILDLOG "(log file truncated) ... " if tell(BUILDLOGTMP);
-#
+    #
 #  foreach (<BUILDLOGTMP>) {
 #  # To avoid strange breakage I do some clean up in the log file
 #    s/[[:cntrl:]]//g;
@@ -143,8 +143,8 @@
 #    print "build is nok\n";
 #    $report->{build} = "nok";
 #  }
-#
-#
+    #
+    #
 #  open (BUILDREPORT,">",$threadbuildarea."/".$infofile) or die "Can't open infofile";
 #  foreach (sort keys %$report) {
 #    chomp $report->{$_};
@@ -154,14 +154,14 @@
 #  close BUILDREPORT;
 #  postFile ($threadbuildarea."/".$infofile);
 
-postFiles({
+    postFiles({
 
-    jobfile => $params->{'jobfile'},
-    resultfile => $params->{'resultfile'},
-    logfile => $params->{'logfile'}
-    
-    });
+            jobfile => $params->{'jobfile'},
+            resultfile => $params->{'resultfile'},
+            logfile => $params->{'logfile'}
 
+        });
+
 }
 
 sub usage {




More information about the Collab-qa-commits mailing list