This makes reading the scoreboard considerably easier.

We abuse the local variable @worst slight, pushing the extra info we
are going to print onto the end of it.

We also have to defer printing the cells, because we compute the cell
to duplicate in column order but we have to output them in row order.
For symmetry we accumulate both rows rather than only the second row.

Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
---
 sg-report-flight |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index 016f8d7..80777af 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -948,7 +948,7 @@ END
         print H "</th>";
     }
     print H "\n";
-    print H "<tr><th>";
+    print H "<tr><th rowspan=2>";
     print H "Last pass / First worst fail";
     print H "</th>";
 
@@ -984,6 +984,8 @@ END
        return ($h,$priority,$ch);
     };
 
+    my @worstrow1;
+    my @worstrow2;
     foreach my $col (@cols) {
        my @worst=(' bgcolor="#444444">',0);
        foreach my $rowix (0..$#{ $fi->{GridRows} }) {
@@ -993,9 +995,13 @@ END
            next if $this[1] < $worst[1];
            next if $this[1] == $worst[1] && $ei->{Step}{status} ne 'pass';
            @worst=@this;
+           push @worst,
+               encode_entities("$ei->{Step}{stepno}. $ei->{Step}{testid}");
        }
-       print H "<td ",$worst[2],">",$worst[0],"</td>";
+       push @worstrow1, "<td ",$worst[2],">",$worst[3],"</td>";
+       push @worstrow2, "<td ",$worst[2],">",$worst[0],"</td>";
     }
+    print H "\n", @worstrow1, "\n<tr>\n", @worstrow2;
     print H "\n";
     # Create a gutter row after the headers.
     print H "<tr><td>&nbsp;</td></tr>\n";
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to