X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=results2html;h=b330c871abbdae8a74df08a6fa36cb5d52eb6c3b;hb=7036cc841d028475016f848ef49a2e7d7fc04edb;hp=8f8725f82f3067c85358951d6fb711bb138af7a7;hpb=b65ac0f58133c7057bad96b9de7af32e06b6e21c;p=pspp
diff --git a/results2html b/results2html
index 8f8725f82f..b330c871ab 100755
--- a/results2html
+++ b/results2html
@@ -3,23 +3,24 @@
use strict;
use warnings;
-use HTML::Entities;
+use Digest::SHA;
+use File::Spec;
+use HTML::Entities qw();
+use URI::Escape;
+
+sub encode_entities {
+ return HTML::Entities::encode_entities($_[0], "<&>'\"");
+}
+
+my $gitweb_url = 'http://benpfaff.org/cgi-bin/gitweb.cgi?p=pspp;a=blob;f=[FILE];hb=[BRANCH]#l[LINE]';
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 (%dist_files);
+my ($dist_dir);
+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+([^:]*):)?\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;
push (@products, \%p);
- push (@{$steps[$#steps]{CHILDREN}}, \%p);
+ push (@{$steps[$#steps]{CHILDREN}}, \%p) if @steps;
+
+ if (defined ($name) && $name eq 'source distribution') {
+ open (DIST, '-|', "zcat $product | tar tf -");
+ while (my $line =
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 "
\n";
@@ -126,13 +204,29 @@ foreach my $s (@steps) {
foreach my $c (@{$s->{CHILDREN}}) {
if (defined ($c->{DIAGNOSTIC})) {
print INDEX "
sha1: ", $sha->hexdigest, "\n";
+
+ $sha = Digest::SHA->new(256);
+ $sha->addfile($p->{PRODUCT});
+ print INDEX "
sha256: ", $sha->hexdigest, "\n";
+ }
+ 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";