X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=results2html;h=9c73d12e31ef3d380297c551c4da14b48129958a;hb=refs%2Fheads%2Fbuild2;hp=4e3224fca3ba9589f147706469845ed5692612e0;hpb=9869b64641f5197bd495a5e62cdbb3f985adbeee;p=pspp diff --git a/results2html b/results2html index 4e3224fca3..9c73d12e31 100755 --- a/results2html +++ b/results2html @@ -38,7 +38,6 @@ my (%vars) = read_vars ('VARS'); my (@products); my (@steps); -my ($new_page) = 0; my ($result) = "failure"; my (%dist_files); my ($dist_dir); @@ -47,13 +46,6 @@ while () { my $ln = $.; chomp; - if (/^ $/) { - $new_page = 1; - @dirstack = (); - print LOG_HTML "
\n";
-	next;
-    }
-
     if (/Entering directory `(.*)'$/) {
         push (@dirstack, $1);
     } elsif (/Leaving directory `(.*)'$/) {
@@ -61,11 +53,10 @@ while () {
     }
 
     my $log_class;
-    if ($new_page) {
-	$new_page = 0;
+    if (my ($title) = /^## (.*) ##$/) {
 	$log_class = "step";
-	if (my ($name, $product) = /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
-	    my $href = "$product/index.html";
+	if (my ($name, $product) = $title =~ /^Saving(?:\s+([^:]*):)?\s+(.*)$/) {
+	    my $href = "$product/summary.html";
 	    $href = $product if ! -e $href;
 
 	    my (%p);
@@ -88,17 +79,21 @@ while () {
 		}
 		close (DIST);
 	    }
-	} else {
+	} elsif ($title eq 'Success') {
+	    $result = 'success';
+	} elsif ($title !~ /^-+$/) {
 	    my (%s);
-	    $s{TITLE} = $_;
+	    $s{TITLE} = $title;
 	    $s{LN} = $ln;
 	    push (@steps, \%s);
 	}
-	$result = 'success' if $_ eq 'Success';
     } else {
-	if (my ($diagnostic) = /(error|warning):/i) {
+	my $diagnostic;
+	$diagnostic = "error" if /error:/i || /FAILED/;
+	$diagnostic = "warning" if /warning:/i;
+	if ($diagnostic) {
 	    my (%d);
-	    $d{DIAGNOSTIC} = lc ($diagnostic);
+	    $d{DIAGNOSTIC} = $diagnostic;
 	    $d{MESSAGE} = $_;
 	    $d{LN} = $ln;
 
@@ -128,8 +123,6 @@ while () {
 		}
 	    }
 	    push (@{$steps[$#steps]{CHILDREN}}, \%d);
-
-	    $log_class = "$diagnostic";
 	}
     }
     printf LOG_HTML "%4d  ", $ln, $ln;
@@ -140,7 +133,7 @@ while () {
     }
 }
 
-open (INDEX, '>','index.html');
+open (INDEX, '>','summary.html');
 
 print INDEX <
@@ -150,7 +143,7 @@ print INDEX <
 EOF
 
-print INDEX "

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

\n"; +print INDEX "

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

\n"; print INDEX "

Build Properties

\n"; print INDEX "\n"; @@ -227,6 +220,11 @@ print LOG_HTML < EOF +open (HTACCESS, '>', '.htaccess'); +print HTACCESS <', "build.css"); print CSS <