WineHQ: follow winetest version change

Ferenc Wagner wferi at afavant.elte.hu
Wed Apr 21 21:50:19 CDT 2004


After these modifications dissect won't be able to process
version 2 winetest output.  But those will soon die out.

ChangeLog:
- signal timeouts in the output
- accept the new Archive: header
- bump file format versions to 3

Index: winetest/dissect
===================================================================
RCS file: /home/wine/tools/winetest/dissect,v
retrieving revision 1.6
diff -u -r1.6 dissect
--- winetest/dissect	19 Apr 2004 20:23:19 -0000	1.6
+++ winetest/dissect	22 Apr 2004 02:39:43 -0000
@@ -31,7 +31,7 @@
 use strict;
 use vars qw/$builds $queuedir $datadir $maxmult/;
 require "winetest.conf";
-my $fileversion = 2;
+my $fileversion = 3;
 
 use File::Temp qw/tempdir/;
 use Errno qw/ENOTEMPTY/;
@@ -79,6 +79,10 @@
 defined $_ or mydie "$1 not in $builds\n";
 
 $_ = <IN>;
+/^Archive: (.*?)\r?$/ or mydie "no archive line: $_";
+print SUM "Archive: $1\n";
+
+$_ = <IN>;
 /^Tag: ([-.0-9a-zA-Z]*)\r?$/ or mydie "no tag line: $_";
 my $tag = $1 eq ""?"":"_$1";
 
@@ -137,9 +141,9 @@
           or mydie "no start line:$.: $_";
         ($unit,$test,$source,$rev) = ($1,$2,$3,$4);
         open OUT, ">:raw", $tmpfile or mydie "can't open $tmpfile: $!\n";
-    } elsif (s/$unit:$test done \(.*\)\r?$//) {
+    } elsif (s/$unit:$test done \((-?\d+)\)\r?$//) {
         chomp;                  # current test failed
-        $result = "failed - -";
+        $result = "failed $1 -";
         goto FINISH;
     } elsif (s/^($test: (\d+) tests executed, (\d+) marked as todo, (\d+) failures?\.)\r?$/$1/) {
         <IN>;                   # current test finished
Index: winetest/gather
===================================================================
RCS file: /home/wine/tools/winetest/gather,v
retrieving revision 1.5
diff -u -r1.5 gather
--- winetest/gather	21 Apr 2004 14:53:17 -0000	1.5
+++ winetest/gather	22 Apr 2004 02:39:04 -0000
@@ -29,7 +29,7 @@
 use strict;
 use vars qw/$datadir/;
 require "winetest.conf";
-my $fileversion = 2;
+my $fileversion = 3;
 
 # Group result containers.  Keys:
 # name: group name
@@ -71,6 +71,7 @@
 # Read in the data
 
 my %alltests;                   # union of test names
+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 $testref = {};
@@ -88,6 +89,11 @@
         close TEST;
         next;
     }
+    if (($url = <TEST>) !~ s/^Archive: (.*)$/$1/) {
+        print "$file: wrong archive url: $_";
+        close TEST;
+        next;
+    }
     while (<TEST>) {
         my ($digest, $unit, $test, $count, $todo, $error,
             $source, $rev) = split;
@@ -169,7 +175,7 @@
    Some tests <span class="mixed">fail</span> in some reports<br>
    Some tests <span class="fail">fail</span> in all reports
 </p>
-<h1>Main summary for build <a href="../$build.exe">$build</a></h1>
+<h1>Main summary for build <a href="$url">$build</a></h1>
 <table class="report">
   <thead>
     <tr>
@@ -196,7 +202,8 @@
         my $file = "$test->{dir}/$testname.txt";
         my ($count, $todo, $error) = @{$test->{results}->{$testname}};
         if ($count eq "failed") {
-            my $fail = -r "$datadir/$build/$file"?"<a href=\"$file\">failed</a>":"failed";
+            my $msg = $todo == 258?"timeout":"failed";
+            my $fail = -r "$datadir/$build/$file"?"<a href=\"$file\">$msg</a>":$msg;
             print OUT "      <td class=\"note\">$fail</td>\n";
         } else {
             my $class = $error?"fail":"pass";



More information about the wine-patches mailing list