X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=blobdiff_plain;f=results2html;h=8f8725f82f3067c85358951d6fb711bb138af7a7;hp=0e39cb4ed7b1d43b81d10f9d1a2daadc144d644c;hb=b65ac0f58133c7057bad96b9de7af32e06b6e21c;hpb=32512097fa8fd103d842f3fe1573d3dc3b209439
diff --git a/results2html b/results2html
index 0e39cb4ed7..8f8725f82f 100755
--- a/results2html
+++ b/results2html
@@ -52,11 +52,8 @@ foreach my $key (sort (keys (%vars))) {
}
print INDEX "\n";
-print INDEX "
Build Summary
\n";
-print INDEX "\n";
-
-my ($n_products) = 0;
-my ($n_steps) = 0;
+my (@products);
+my (@steps);
my ($new_page) = 0;
while () {
my $ln = $.;
@@ -73,29 +70,29 @@ while () {
$new_page = 0;
$log_class = "step";
if (my ($product) = /^Saving (.*)$/) {
- print INDEX "\n \n" if !$n_products++;
my $href = "$product/index.html";
$href = $product if ! -e $href;
- print INDEX " - ";
- print INDEX encode_entities ($product), "";
- print INDEX " (log)";
- print INDEX "
\n";
+
+ my (%p);
+ $p{PRODUCT} = $product;
+ $p{HREF} = $href;
+ $p{LN} = $ln;
+ push (@products, \%p);
+ push (@{$steps[$#steps]{CHILDREN}}, \%p);
} else {
- print INDEX "
" if !$n_steps;
- print INDEX "- ", encode_entities ($_);
- print INDEX " (log)";
- $n_products = 0;
+ my (%s);
+ $s{TITLE} = $_;
+ $s{LN} = $ln;
+ push (@steps, \%s);
}
} else {
if (my ($diagnostic) = /(error|warning):/) {
- if ($n_products) {
- print INDEX " \n";
- $n_products = 0;
- }
- print INDEX "
";
- print INDEX "";
- print INDEX encode_entities ($_);
- print INDEX "
\n";
+ my (%d);
+ $d{DIAGNOSTIC} = $diagnostic;
+ $d{MESSAGE} = $_;
+ $d{LN} = $ln;
+ push (@{$steps[$#steps]{CHILDREN}}, \%d);
+
$log_class = "$diagnostic";
}
}
@@ -106,10 +103,43 @@ while () {
print LOG_HTML encode_entities ($_), "\n";
}
}
-print INDEX " \n" if $n_products;
-print INDEX " \n" if $n_steps;
+
+print INDEX "Build Products
\n";
+print INDEX "\n";
+
+sub log_link {
+ my ($ln) = @_;
+ return "(log)";
+}
+
+print INDEX "Build Summary
\n";
+print INDEX "\n";
+foreach my $s (@steps) {
+ print INDEX "- ", encode_entities ($s->{TITLE});
+ print INDEX " ", log_link ($s->{LN});
+ foreach my $c (@{$s->{CHILDREN}}) {
+ if (defined ($c->{DIAGNOSTIC})) {
+ print INDEX "
{DIAGNOSTIC}\">";
+ print INDEX "{LN}\">";
+ print INDEX encode_entities ($c->{MESSAGE});
+ print INDEX "
\n";
+ } else {
+ print INDEX "→ {HREF}), "\">";
+ print INDEX encode_entities ($c->{PRODUCT});
+ print INDEX "
\n";
+ }
+ }
+ print INDEX " \n";
+}
+print INDEX "
\n";
+
print INDEX <