[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[OSSTEST PATCH 35/60] sg-report-job-history (nfc): Have main program decide HTML filename


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Date: Fri, 14 Aug 2020 18:21:40 +0100
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 14 Aug 2020 17:26:34 +0000
  • Ironport-sdr: 13x5v+jN+N7cZeeL23w1/uVLruEaZDX2PvS1Bv/h4AYAyeBpFf/B+gq+xqzeB+qDtYrCXfVFnu gZfj7GBZIxapXcfPpRr0ZGlc/ceqdBEpRfm7+IocuNWp2+oKr8vQBhjqlTzTEA9+yR7YxyQBQb hFXTy4rrQ9503CK45bPzBhXP6Wka4F5ACTVtX9AD908rcXyd76lo6yGLC2oseULiDew0OAqZiK PO/QFex9tA7sQ9yc0CSD69keBbH+ZVMJQO6AgNrq3bvIcOZw+EIEpHEjcoWLo043AN2AHTc5yy 3j0=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 sg-report-job-history | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/sg-report-job-history b/sg-report-job-history
index 3307b281..3f10a74c 100755
--- a/sg-report-job-history
+++ b/sg-report-job-history
@@ -109,8 +109,8 @@ END
     }
 }
 
-sub processjobbranch ($$) {
-    my ($j,$bra) = @_;
+sub processjobbranch ($$$) {
+    my ($j,$bra,$html_file) = @_;
 
     my $buildsq= db_prepare(<<END);
         SELECT * FROM runvars
@@ -210,15 +210,13 @@ END
 END
 
     if (defined $htmlout) {
-        my ($title,$html_file,$url);
+        my ($title,$url);
        ensuredir "$htmlout/history";
        ensuredir "$htmlout/history/$j";
         if (defined $bra) {
             $title= "$j (branch $bra)";
-            $html_file= "history/$j/$bra.html";
         } else {
             $title= "$j (all branches)";
-            $html_file= "history/$j/ALL.html";
         }
         $html_file= "$htmlout/$html_file";
         open H, "> $html_file.new" or die "$html_file $!";
@@ -305,7 +303,8 @@ foreach my $j (@jobs) {
 parallel_by_fork('sg-report-job-history', $maxjobs, \@tasks, sub {
     my ($task) = @_;
     my ($job, $branch) = split / /, $task; # $branch might be undef
+    my $html_file = sprintf "history/%s/%s.html", $job, ($branch // 'ALL');
     db_retry($dbh_tests, [], sub {
-        processjobbranch($job, $branch);
+        processjobbranch($job, $branch, $html_file);
     });
 });
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.