Skip to contentSkip to conversation

sg-report-job-history: alternate color of osstest column only when it changes

PATCH In review Ian Campbell 2 participants 3 messages Jan 6, 2016 – Jan 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sg-report-job-history: alternate color of osstest column only when it changes

Currently the bgcolor of the osstest column alternates on each line, rather than only when it changes as the other revision columns do.

A given flight might touch multiple osstest revisions (although in practice they rarely do) but it seems reasonable to simply consider any change as a change.

---
 sg-report-job-history | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
sg-report-job-history +5 -5
index 0e2a3f9..e2e5806 100755
@@ -234,6 +234,7 @@ END
         my @last_revs;
         my @alt_revs;
         my $alt_hosts;
+        my $alt_osstest;
         foreach my $r (@test_rows) {
             my $altcolour= report_altcolour($alternate);
             print H "<tr $altcolour>";
@@ -254,16 +255,15 @@ END
             my $hosts_colour = report_altchangecolour(\$alt_hosts, $hosts);
             print H "<td $hosts_colour>".encode_entities($hosts)."</td>\n";
             $osstestverq->execute($r->{Flight}{flight});
-            print H
-                "<td>",
-                (join ' ',
+            my $osstestrevs = join ' ',
                  map {
                     $_ = $_->{harness};
                     s/^([0-9a-f]{12})[0-9a-f]+\b/$1/;
                     "<kbd>".encode_entities($_)."</kbd>";
                  }
-                 @{ $osstestverq->fetchall_arrayref({}) }),
-                "</td>\n";
+                 @{ $osstestverq->fetchall_arrayref({}) };
+            my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs);
+            print H "<td $osstest_colour>$osstestrevs</td>\n";
             foreach my $i (0..$#rev_grid_cols) {
                 my $v= $r->{Revisions}[$i];
 		my $rev_colour = report_altchangecolour(\$alt_revs[$i], $v);
Signature · 1 line
2.6.1
#1 lore raw

On Wed, 2016-01-06 at 11:08 +0000, Ian Campbell wrote:

ping?

Quoted 41 lines

Currently the bgcolor of the osstest column alternates on each line, rather than only when it changes as the other revision columns do.

A given flight might touch multiple osstest revisions (although in practice they rarely do) but it seems reasonable to simply consider any change as a change.

---
 sg-report-job-history | 10 +++++-----

 1 file changed, 5 insertions(+), 5 deletions(-)
sg-report-job-history +1 -0
index 0e2a3f9..e2e5806 100755
@@ -234,6 +234,7 @@ END
          my @last_revs;
          my @alt_revs;
          my $alt_hosts;
+        my $alt_osstest;
          foreach my $r (@test_rows) {
              my $altcolour= report_altcolour($alternate);
              print H "<tr $altcolour>";
@@ -254,16 +255,15 @@ END
              my $hosts_colour = report_altchangecolour(\$alt_hosts,
 $hosts);

             print H "<td $hosts_colour>".encode_entities($hosts)."</td>\n"; $osstestverq->execute($r->{Flight}{flight}); -            print H
-                "<td>",
-                (join ' ',
+            my $osstestrevs = join ' ',
                  map {
                     $_ = $_->{harness}; s/^([0-9a-f]{12})[0-9a-f]+\b/$1/; "<kbd>".encode_entities($_)."</kbd>"; }
-                 @{ $osstestverq->fetchall_arrayref({}) }), -                "</td>\n";

Quoted 8 lines

+                 @{ $osstestverq->fetchall_arrayref({}) }; +            my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs);
+            print H "<td $osstest_colour>$osstestrevs</td>\n"; foreach my $i (0..$#rev_grid_cols) {
                 my $v= $r->{Revisions}[$i];
  my $rev_colour = report_altchangecolour(\$alt_revs[$i], $v);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel