my $statement =<<EOS;
- select timezone('GMT'::text, now())::timestamp(0) without time zone - b.snapshot AS when_ago, b.*
- from dashboard_mat b
- order by branch = 'master' desc,
- branch desc, $sort_clause
- snapshot desc
+ SELECT timezone('GMT'::text, now())::timestamp(0) without time zone - b.snapshot AS when_ago,
+ b.*,
+ s.log_text
+ FROM dashboard_mat b LEFT JOIN build_status_log s
+ ON b.snapshot = s.snapshot AND s.log_stage = 'test-results.log'
+ ORDER BY b.branch = 'master' desc,
+ b.branch desc, $sort_clause
+ b.snapshot desc
EOS
;
$row->{build_flags} =~ s/,/ /g;
$row->{build_flags} =~ s/_PC\b//g;
$row->{build_flags} = lc($row->{build_flags});
+ if (defined($row->{log_text}))
+ { # convert to a hash
+ $row->{log_text} = { split /\s+/, $row->{log_text} };
+ }
push(@$statrows,$row);
}
$sth->finish;
[% IF changed_since_success_logs.0 %]
<h5>Git log</h5>
<pre>
-<a href="https://github.com/postgres/postgres/compare/[% last_success_git_ref %]...[% last_build_git_ref %]">Change Set prior to this build</a>
+<a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% last_build_git_ref %]">Change Set prior to this build</a>
-<a href="https://github.com/postgres/postgres/compare/[% last_success_git_ref %]...[% git_head_ref %]">Change Set including this build</a>
+<a href="https://github.com/Exim/exim/compare/[% last_success_git_ref %]...[% git_head_ref %]">Change Set including this build</a>
[% FOREACH clog IN changed_since_success_logs ; PROCESS gitlog -%]
[%- END -%]
#'integer-datetimes' => '/img/days.png',
}
-%]
+[%
+ res_imgs = {
+ P = '/img/t_good.gif',
+ F => '/img/t_fail.gif',
+ '.' => '/img/t_notdone.gif',
+ }
+-%]
[%- BLOCK img ; IF flag == 'depend' or flag == 'gnu-ld' ; ; ELSIF flag_imgs.$flag %]<img src="[% flag_imgs.$flag %]" title="[% flag %]" alt="[% flag %]" height="16" width="16" class="inline" align="bottom" /> [% ELSE %][%#
flag ; ' '
%][% END ; END -%]
[%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
[%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
[%- END -%]
+[%# The IF-backstop is ugly and I'm not understanding why the res_img lookup does not for for '.' -%]
+[%- BLOCK test_result %]<img src="[% IF res_imgs.$r.defined ; res_imgs.$r ; ELSE %]/img/t_notdone.gif [% END %]" title="[% test %]" alt="[% r %]" height="16" width="1" class="inline" align="bottom" />[%- END -%]
[% WRAPPER 'page.tt'
title = 'Exim BuildFarm Status'
bodyclass = 'none'
[% brch = "" %]
[% FOREACH row IN statrows %]
[% IF row.branch != brch ; brch = row.branch %]
-<tr><th class="head" colspan="5">Branch: [% brch %]</th></tr>
-<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th></tr>
+<tr><th class="head" colspan="6">Branch: [% brch %]</th></tr>
+<tr><th colspan="2">Alias</th><th>System</th><th>Status</th><th>Flags</th><th>Detail</th></tr>
[% END %]
<tr [% PROCESS cl bgfor=row.stage %]>
<td><a
[%- IF row.stage != 'OK' %]Details[% ELSE %]Config[% END -%]</a></td>
<td class="flags">[% FOREACH flag IN row.build_flags.split().sort() ; PROCESS img ; END %]</td>
+ <td class="tests">[% FOREACH test IN row.log_text.keys.nsort ; r = row.log_text.$test ; PROCESS test_result ; END %]</td>
</tr>
[% END %]
</table>