]> xenbits.xensource.com Git - people/aperard/osstest.git/commitdiff
sg-report-flight: Make logfile list into table, with more info
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 21 Jun 2017 12:21:54 +0000 (13:21 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 21 Jun 2017 22:32:24 +0000 (23:32 +0100)
Also print the mtime and the size.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
v2: New patch.

sg-report-flight

index b7cd03ae4f69db5edc19e1ea2e019382829fe816..f7150a0906d3d527ded157c5503dec7d7a103479 100755 (executable)
@@ -1026,7 +1026,13 @@ END
 <p>
 <h2>Logfiles etc.</h2>
 For main test script logfiles, see entries in steps table.
-<ul>
+<p>
+<table>
+<tr>
+<th>modified/fetched</th>
+<th align="right">size</th>
+<th align="left">filename</th>
+</tr>
 END
     opendir LOGS, "$htmldir/$job" or die "$htmldir/$job $!";
     my @dents= sort readdir LOGS;
@@ -1035,14 +1041,23 @@ END
         next if $dent eq "$htmlleaf.new" or $dent eq $htmlleaf
             or $dent eq '..' or $dent eq '.' or $issteplog{$dent};
         stat("$htmldir/$job/$dent") or die "$dent $!";
-        print H "<li><a href=\"".encode_entities(uri_escape($dent))."\">".
+       printf H "<tr><td>%s</td>", show_abs_time((stat _)[9]);
+       if (-f _) {
+           my $size = (stat _)[7];
+           printf H "<td align=\"right\">&nbsp;%s</td>", $size;
+       } else {
+           print H "<td align=\"right\">dir</td>";
+       }
+       print H "<td>";
+        print H "<a href=\"".encode_entities(uri_escape($dent))."\">".
             encode_entities($dent).(-d _ ? "/" : "")."</a>\n";
         if ($dent eq 'build') {
             print H " (outputs from build)";
         }
+       print H "</td></tr>\n";
     }
     print H <<END;
-</ul>
+</table>
 <h2>Test control variables</h2>
 <table rules=all><tr><th>Name</th><th>Value</th><th>Source</th></tr>
 END