git://git.exim.org
/
buildfarm-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
20e3948
)
split status-bar ranges on noncotiguous testcase numbers
author
Jeremy Harris
<jgh@redhat.com>
Thu, 5 Jan 2023 16:15:28 +0000
(16:15 +0000)
committer
Jeremy Harris
<jgh@redhat.com>
Thu, 5 Jan 2023 16:15:28 +0000
(16:15 +0000)
cgi-bin/show_status.pl
patch
|
blob
|
history
diff --git
a/cgi-bin/show_status.pl
b/cgi-bin/show_status.pl
index 26967c0f279f6279b6e72661df44f96b4a0c88b0..1ac959ebb5cc600fa90d17d80cd7d6829af69b61 100755
(executable)
--- a/
cgi-bin/show_status.pl
+++ b/
cgi-bin/show_status.pl
@@
-79,19
+79,22
@@
while (my $row = $sth->fetchrow_hashref)
if (defined($row->{log_text}))
{ # convert to a hash, find ranges, output list of ranges
my $h = { split /\s+/, $row->{log_text} };
if (defined($row->{log_text}))
{ # convert to a hash, find ranges, output list of ranges
my $h = { split /\s+/, $row->{log_text} };
- my $i;
- my $start;
+ my ($i, $start, $last);
my @ranges;
foreach my $k (sort {$a<=>$b} keys %$h)
{
if (defined $start)
{
my @ranges;
foreach my $k (sort {$a<=>$b} keys %$h)
{
if (defined $start)
{
- if ($h->{$k} ne $h->{$start})
+ if ($h->{$k} ne $h->{$start}
|| $k != $last + 1
)
{
# The result (skiped, Passed, Failed) for this testcase number
{
# The result (skiped, Passed, Failed) for this testcase number
- # is different to the start one of the range. Reset the
- # start and the count, for a new range.
+ # is different to the start one of the range,
+ # or the range became non-contiguous.
+ # Add text for the range to list of ranges
+ # (these three elements get used by "status.tt" BLOCK colourbar)
+ # Reset the start and the count, for a new range.
+
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
$start = $k;
$i = 1;
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
$start = $k;
$i = 1;
@@
-108,10
+111,11
@@
while (my $row = $sth->fetchrow_hashref)
$start = $k;
$i = 1;
}
$start = $k;
$i = 1;
}
+ $last = $k;
}
if (defined $start)
{
}
if (defined $start)
{
- #
add text for the range to list of ranges
+ #
close out the final range
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
}
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
}