X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=blobdiff_plain;f=results2html;h=abc520d3db5033cad7701e7725f29a09c7113adf;hp=8f8725f82f3067c85358951d6fb711bb138af7a7;hb=38fb5346628a7b16e9f2a3d066059539037498bf;hpb=b65ac0f58133c7057bad96b9de7af32e06b6e21c diff --git a/results2html b/results2html index 8f8725f82f..abc520d3db 100755 --- a/results2html +++ b/results2html @@ -6,17 +6,8 @@ use warnings; use HTML::Entities; open (LOG, '<', "LOG"); -open (INDEX, '>','index.html'); open (LOG_HTML, '>', "log.html"); -print INDEX < - - - - -EOF - print LOG_HTML < @@ -39,22 +30,12 @@ sub read_vars { } return %vars; } - my (%vars) = read_vars ('VARS'); -print INDEX "

Build Properties

\n"; -print INDEX "\n"; -print INDEX "\n"; -foreach my $key (sort (keys (%vars))) { - print INDEX ""; - print INDEX ""; - print INDEX ""; - print INDEX "\n"; -} -print INDEX "
NameValue
", encode_entities ($key), "", encode_entities ($vars{$key}), "
\n"; my (@products); my (@steps); my ($new_page) = 0; +my ($result) = "failure"; while () { my $ln = $.; chomp; @@ -69,11 +50,12 @@ while () { 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,10 +67,11 @@ while () { $s{LN} = $ln; push (@steps, \%s); } + $result = 'success' if $_ eq 'Success'; } else { - if (my ($diagnostic) = /(error|warning):/) { + if (my ($diagnostic) = /(error|warning):/i) { my (%d); - $d{DIAGNOSTIC} = $diagnostic; + $d{DIAGNOSTIC} = lc ($diagnostic); $d{MESSAGE} = $_; $d{LN} = $ln; push (@{$steps[$#steps]{CHILDREN}}, \%d); @@ -104,10 +87,35 @@ while () { } } +open (INDEX, '>','index.html'); + +print INDEX < + + + + +EOF + +print INDEX "

Build ", $vars{"build_number"}, ": $result

\n"; + +print INDEX "

Build Properties

\n"; +print INDEX "\n"; +print INDEX "\n"; +foreach my $key (sort (keys (%vars))) { + print INDEX ""; + print INDEX ""; + print INDEX ""; + print INDEX "\n"; +} +print INDEX "
NameValue
", encode_entities ($key), "", encode_entities ($vars{$key}), "
\n"; + print INDEX "

Build Products

\n"; print INDEX "