[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
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |