[OSSTEST PATCH 77/82] sg-report-flight: Improvements to other job (share/reuse) reporting

Ian Jackson posted 82 patches 5 years ago
[OSSTEST PATCH 77/82] sg-report-flight: Improvements to other job (share/reuse) reporting
Posted by Ian Jackson 5 years ago
* Prefer to show "prep" (purple) rather than "share".
* Show our own relationship, in particular to show if it was prep.

Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 sg-report-flight | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/sg-report-flight b/sg-report-flight
index 7dc218cf..2a79db13 100755
--- a/sg-report-flight
+++ b/sg-report-flight
@@ -1473,12 +1473,12 @@ END
 	  "$c{ResultsHtmlPubBaseUrl}/host/$srow->{hostname}.html",
 	  $srow->{hostname};
 	my $rel =
-	  $srow->{olive} ?
-	  "<td align=\"center\" bgcolor=\"$red\">share</td>"
-	  :
 	  $srow->{prep_started} ?
 	  "<td align=\"center\" bgcolor=\"$purple\">prep.</td>"
 	  :
+	  $srow->{olive} ?
+	  "<td align=\"center\" bgcolor=\"$red\">share</td>"
+	  :
 	  "<td align=\"center\">reuse</td>";
         if (defined $srow->{flight}) {
 	    my $furl = "$c{ReportHtmlPubBaseUrl}/$srow->{flight}/";
@@ -1499,8 +1499,10 @@ END
 END
 		  $jurl, $srow->{job};
 	    } else {
-		printf H <<END;
-<td></td>
+		confess unless $rel =~ m{([0-9a-z. ]+)\</td\>$};
+		$rel = '<td></td>' if $1 eq 'reuse';
+		printf H <<END, $rel;
+%s
 <td align="center">this</td>
 <td align="center">this</td>
 END
-- 
2.20.1