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:
eeed091
)
annotate status-bar code
author
Jeremy Harris
<jgh@redhat.com>
Thu, 5 Jan 2023 15:59:45 +0000
(15:59 +0000)
committer
Jeremy Harris
<jgh@redhat.com>
Thu, 5 Jan 2023 15:59:45 +0000
(15:59 +0000)
cgi-bin/show_status.pl
patch
|
blob
|
history
diff --git
a/cgi-bin/show_status.pl
b/cgi-bin/show_status.pl
index d52394fec86ff93a8682fd94ddef18dc3da942d8..26967c0f279f6279b6e72661df44f96b4a0c88b0 100755
(executable)
--- a/
cgi-bin/show_status.pl
+++ b/
cgi-bin/show_status.pl
@@
-65,13
+65,17
@@
EOS
my $statrows=[];
my $sth=$db->prepare($statement);
$sth->execute;
my $statrows=[];
my $sth=$db->prepare($statement);
$sth->execute;
+
+# walk the set of result rows from the SQL query above
while (my $row = $sth->fetchrow_hashref)
{
next if (@members && ! grep {$_ eq $row->{sysname} } @members);
while (my $row = $sth->fetchrow_hashref)
{
next if (@members && ! grep {$_ eq $row->{sysname} } @members);
+
$row->{build_flags} =~ s/^\{(.*)\}$/$1/;
$row->{build_flags} =~ s/,/ /g;
$row->{build_flags} =~ s/_PC\b//g;
$row->{build_flags} = lc($row->{build_flags});
$row->{build_flags} =~ s/^\{(.*)\}$/$1/;
$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, 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} };
@@
-85,23
+89,29
@@
while (my $row = $sth->fetchrow_hashref)
{
if ($h->{$k} ne $h->{$start})
{
{
if ($h->{$k} ne $h->{$start})
{
+ # 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.
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
$start = $k;
$i = 1;
}
else
{
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
$start = $k;
$i = 1;
}
else
{
+ # bump the size of this range
$i++;
}
}
else
{
$i++;
}
}
else
{
+ # First ever range for this row
$start = $k;
$i = 1;
}
}
if (defined $start)
{
$start = $k;
$i = 1;
}
}
if (defined $start)
{
+ # add text for the range to list of ranges
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
}
push @ranges, sprintf("%s %s %s", $h->{$start}, $start, $i);
}