X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=blobdiff_plain;f=results2html;h=4bf398d35c49b9734d92578e3abdc4a6c71f37d2;hp=8f8725f82f3067c85358951d6fb711bb138af7a7;hb=215d09f8d91f75eac208d4945906a959bc508701;hpb=b65ac0f58133c7057bad96b9de7af32e06b6e21c
diff --git a/results2html b/results2html
index 8f8725f82f..4bf398d35c 100755
--- a/results2html
+++ b/results2html
@@ -3,20 +3,12 @@
use strict;
use warnings;
+use File::Spec;
use HTML::Entities;
open (LOG, '<', "LOG");
-open (INDEX, '>','index.html');
open (LOG_HTML, '>', "log.html");
-print INDEX < {DIAGNOSTIC}\">";
print INDEX "{LN}\">";
print INDEX encode_entities ($c->{MESSAGE});
- print INDEX "Build Properties
\n";
-print INDEX "\n";
-print INDEX "
\n";
my (@products);
my (@steps);
my ($new_page) = 0;
+my ($result) = "failure";
+my @dirstack;
while ( \n";
-foreach my $key (sort (keys (%vars))) {
- print INDEX "Name Value ";
- print INDEX " \n";
-}
-print INDEX "", encode_entities ($key), " ";
- print INDEX "", encode_entities ($vars{$key}), " ";
- print INDEX "\n";
next;
}
+ if (/Entering directory `(.*)'$/) {
+ push (@dirstack, $1);
+ } elsif (/Leaving directory `(.*)'$/) {
+ pop (@dirstack);
+ }
+
my $log_class;
if ($new_page) {
$new_page = 0;
$log_class = "step";
- if (my ($product) = /^Saving (.*)$/) {
+ if (my ($name, $product) = /^Saving(?:([^:]*):)?\s+(.*)$/) {
my $href = "$product/index.html";
$href = $product if ! -e $href;
my (%p);
+ $p{NAME} = $name if defined ($name);
$p{PRODUCT} = $product;
$p{HREF} = $href;
$p{LN} = $ln;
@@ -85,12 +76,28 @@ while (
Build ", $vars{"build_number"}, ": $result
\n";
+
+print INDEX "Build Properties
\n";
+print INDEX "\n";
+print INDEX "
\n";
+
print INDEX " \n";
+foreach my $key (sort (keys (%vars))) {
+ print INDEX "Name Value ";
+ print INDEX " \n";
+}
+print INDEX "", encode_entities ($key), " ";
+ print INDEX "", encode_entities ($vars{$key}), " ";
+ print INDEX "Build Products
\n";
print INDEX "\n";
foreach my $p (@products) {
- print INDEX "
→ {HREF}), "\">"; print INDEX encode_entities ($c->{PRODUCT}); - print INDEX "
\n"; + print INDEX " "; + print INDEX log_link ($c->{LN}); + print INDEX "\n"; } } print INDEX "\n";