From: Ben Pfaff Date: Wed, 17 Feb 2010 00:16:52 +0000 (-0800) Subject: add build products list X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b65ac0f58133c7057bad96b9de7af32e06b6e21c;p=pspp add build products list --- diff --git a/build-pspp b/build-pspp index 634364fd6b..e7c819cc6d 100755 --- a/build-pspp +++ b/build-pspp @@ -352,7 +352,7 @@ sub try_run { print LOG $_; my $elapsed = time () - $start; - $progress = sprintf "%d lines logged, %d s elapsed", + my $progress = sprintf "%d lines logged, %d s elapsed", $lines++, $elapsed; if ($est_time > 0) { my $left = $est_time - $elapsed; 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 "
  1. ", 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 "
  2. \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 "
    1. ", 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 "
    2. \n"; +} +print INDEX "
    \n"; + print INDEX < EOF @@ -125,7 +155,7 @@ print CSS <p { @@ -175,17 +205,17 @@ a:hover { text-decoration: underline } +ol>li>p { + margin-top: 0; + margin-bottom: 0 +} .step { font-weight: bold } .warning { - background: yellow; - margin-top: 0; - margin-bottom: 0 + background: yellow } .error { - background: orange; - margin-top: 0; - margin-bottom: 0 + background: orange } EOF