diff --git a/netlink-html.pl b/netlink-html.pl index f57f06e..5a5f569 100755 --- a/netlink-html.pl +++ b/netlink-html.pl @@ -164,6 +164,9 @@ sub html_hier_test_head { } elsif ($hier eq "iface" && $dv->{ifdmesg}) { my $ifdmesg = encode_entities($dv->{ifdmesg}{$name}); $title = " title=\"$ifdmesg\""; + } elsif ($hier eq "patch" && $hv->{diff}) { + my $link = uri_escape($hv->{diff}, "^A-Za-z0-9\-\._~/"); + $name = "$name"; } print $html " $name\n"; } @@ -178,9 +181,9 @@ sub html_hier_test_head_utilization { my $te = $hier eq "date" ? "th" : "td"; print $html " \n"; print $html " ", "" x (@TESTKEYS-1), "\n"; - foreach my $hvi (@hiers) { + foreach my $hv (@hiers) { my $title = ""; - my $name = $hvi->{$hier} || ""; + my $name = $hv->{$hier} || ""; if ($hier =~ /date$/) { my $time = encode_entities($name); $title = " title=\"$time\""; @@ -188,6 +191,9 @@ sub html_hier_test_head_utilization { } elsif ($hier eq "iface" && $dv->{ifdmesg}) { my $ifdmesg = encode_entities($dv->{ifdmesg}{$name}); $title = " title=\"$ifdmesg\""; + } elsif ($hier eq "patch" && $hv->{diff}) { + my $link = uri_escape($hv->{diff}, "^A-Za-z0-9\-\._~/"); + $name = "$name"; } print $html " <$te class=\"hier $hier\"$title>$name\n"; } @@ -664,11 +670,14 @@ sub parse_result_files { $dv->{dmesg} ||= $dmesg if -f $dmesg; (my $dmesgboot = $version) =~ s,version,dmesg-boot,; $dv->{dmesgboot} ||= $dmesgboot if -f $dmesgboot; - (my $diff = $version) =~ s,/version-,/diff-,; - $dv->{diff} ||= $diff if -s $diff; %$dv = (parse_version_file($version), %$dv); } + if ($file->{patch}) { + foreach my $diff (sort glob("$date/$file->{patch}/diff-*.txt")) { + $hiers{diff} ||= $diff if -s $diff; + } + } $dv->{build} = ($dv->{location} =~ /^deraadt@\w+.openbsd.org:/) ? "snapshot" : "custom"; if ($dv->{dmesgboot}) {