]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
sg-report-job-history: alternate color of osstest column only when it changes
authorIan Campbell <ian.campbell@citrix.com>
Wed, 6 Jan 2016 11:08:43 +0000 (11:08 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 20 Jan 2016 16:40:52 +0000 (16:40 +0000)
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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-report-job-history

index 0ca441c40e2265b4a56069135026b35108b63c2e..abfe63004ef0ebd45af1dad7b6722d0c78291202 100755 (executable)
@@ -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);