X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=results2html;h=a5a7688e5a8b040e534be21267409628eb6f635b;hb=c5a2ccec277a0a538f2def943c71a9f7e2dbebd1;hp=8f8725f82f3067c85358951d6fb711bb138af7a7;hpb=b65ac0f58133c7057bad96b9de7af32e06b6e21c;p=pspp
diff --git a/results2html b/results2html
index 8f8725f82f..a5a7688e5a 100755
--- a/results2html
+++ b/results2html
@@ -3,23 +3,23 @@
use strict;
use warnings;
-use HTML::Entities;
+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);
+
+ 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 "
→ {HREF}), "\">"; print INDEX encode_entities ($c->{PRODUCT}); - print INDEX "
\n"; + print INDEX " "; + print INDEX log_link ($c->{LN}); + print INDEX "\n"; } } print INDEX "\n";