Alexandre Julliard : winetest: Make sure the winetest. exe build link points to a valid URL.
Alexandre Julliard
julliard at winehq.org
Mon Jun 16 08:31:07 CDT 2008
Module: tools
Branch: master
Commit: b9dee8e3f4e5b74bcb92521f7b6c7859a55c41bc
URL: http://source.winehq.org/git/tools.git/?a=commit;h=b9dee8e3f4e5b74bcb92521f7b6c7859a55c41bc
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Jun 16 15:25:16 2008 +0200
winetest: Make sure the winetest.exe build link points to a valid URL.
---
winetest/gather | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/winetest/gather b/winetest/gather
index 6c06b39..12deb4e 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -27,6 +27,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
use strict;
+use CGI qw(:standard);
+charset("utf-8");
+
use vars qw/$datadir $gitweb/;
require "winetest.conf";
@@ -108,7 +111,7 @@ exit 2 unless defined $outdated;
# Read in the data
my %alltests; # union of test names
-my $url; # archive url of winetest.exe
+my $url = ""; # archive url of winetest.exe
foreach my $file (glob "$datadir/$build/*/summary.txt") {
(my $dir = $file) =~ s|^\Q$datadir/$build\E/(.*?)/summary.txt$|$1|;
(my $id, my @tag) = split /_/, $dir;
@@ -144,11 +147,14 @@ foreach my $file (glob "$datadir/$build/*/summary.txt") {
close TEST;
next;
}
- if (($url = <TEST>) !~ s/^Archive: (.*)\n$/$1/) {
- print STDERR "$name0:error: wrong archive url in '$file': $url";
+ my $archive = <TEST>;
+ if ($archive !~ s/^Archive: (.*)\n$/$1/) {
+ print STDERR "$name0:error: wrong archive url in '$file': $archive";
close TEST;
next;
}
+ $url = "href=\"" . escapeHTML($archive) . "\"" if (!$url && $archive =~ /^http:\/\//);
+
while (<TEST>) {
my ($dummy, $dll, $unit, $count, $todos, $errors, $skips,
$source, $rev) = split;
@@ -423,7 +429,7 @@ print OUT <<"EOF";
<p class="legend">This <span class="result pass also-todo">border</span> and this <span class="result todo">background</span> signal that the implementation needs some work.</p>
</div>
<div class="main">
-<h1>Main summary for build <a href="$url" title="$build">$short_build</a></h1>
+<h1>Main summary for build <a $url title="$build">$short_build</a></h1>
<table class="report">
$header_footer
<tbody onDblClick="clone();">
More information about the wine-cvs
mailing list