tools/winetest dissect gather winetest.cgi win ...

Jeremy Newman jnewman at wine.codeweavers.com
Wed Aug 8 16:43:02 CDT 2007


ChangeSet ID:	31321
CVSROOT:	/opt/cvs-commit
Module name:	tools
Changes by:	jnewman at winehq.org	2007/08/08 16:43:02

Modified files:
	winetest       : dissect gather winetest.cgi winetest.conf 

Log message:
	Paul Vriens <paul.vriens.wine at gmail.com>
	Make a distinction between a real winetest crash and a partial report file

Patch: http://cvs.winehq.org/patch.py?id=31321

Old revision  New revision  Changes     Path
 1.23          1.24          +10 -2      tools/winetest/dissect
 1.24          1.25          +17 -4      tools/winetest/gather
 1.8           1.9           +3 -3       tools/winetest/winetest.cgi
 1.4           1.5           +5 -1       tools/winetest/winetest.conf

Index: tools/winetest/dissect
diff -u -p tools/winetest/dissect:1.23 tools/winetest/dissect:1.24
--- tools/winetest/dissect:1.23	8 Aug 2007 21:43: 2 -0000
+++ tools/winetest/dissect	8 Aug 2007 21:43: 2 -0000
@@ -29,7 +29,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 use strict;
-use vars qw/$builds $queuedir $datadir $maxmult $fileversion/;
+use vars qw/$builds $queuedir $datadir $maxmult $fileversion $maxfilesize/;
 require "winetest.conf";
 
 use File::Temp qw/tempdir/;
@@ -56,6 +56,9 @@ my $tmpfile = "$tmpdir/dissect.tmp";
 open IN, "<:raw", $report or mydie "can't read $report: $!";
 open SUM, ">$tmpdir/summary.txt" or mydie "can't write $tmpdir/summary.txt: $!";
 
+# Get the size of the report file
+my $filesize = -s "$report";
+
 $_ = <IN>;
 /^Version (\d+)\r?$/ or mydie "no version header: $_";
 $1 eq $fileversion or mydie "illegal version: $1\n";
@@ -184,8 +187,13 @@ while (<IN>) {
     }
 }
 if (defined $unit) {
+    # Either winetest crashed or the report file was cut off
     $_="";
-    $result = "failed - - -";
+    if ($filesize == $maxfilesize) {
+        $result = "failed filelimit - -";
+    } else {
+        $result = "failed crash - -";
+    }
     goto FINISH;
 }
 close SUM or mydie "error writing $tmpdir/summary.txt: $!";
Index: tools/winetest/gather
diff -u -p tools/winetest/gather:1.24 tools/winetest/gather:1.25
--- tools/winetest/gather:1.24	8 Aug 2007 21:43: 2 -0000
+++ tools/winetest/gather	8 Aug 2007 21:43: 2 -0000
@@ -112,8 +112,10 @@ foreach my $file (glob "$datadir/$build/
             } else {
                 $group->{extrema}->{$testname} = [$error, $error];
             }
-        } elsif ($todo eq "-") {
+        } elsif ($todo eq "crash") {
             $testref->{crash} = $testname;
+        } elsif ($todo eq "filelimit") {
+            $testref->{filelimit} = $testname;
         }
         my $prevdigest = \$group->{digests}->{$testname};
         $$prevdigest = ($count eq "failed" || $error || $skipped ||
@@ -135,13 +137,16 @@ foreach my $group (@groups) {
                 $group->{digests}->{$testname} = "differ";
                 my ($dll, $subtest) = split(/:/, $testname);
                 my $crash = $test->{crash};
+                my $filelimit = $test->{filelimit};
                 if (exists $test->{dllmissing}->{$dll}) {
                     # Mark this test as missing because of a missing dll
                     $test->{results}->{$testname} = ["dll missing", "-", "-", "-"]; 
                 } elsif (defined $crash && $testname gt $crash) {
-                    # Mark this test as missing because of what looks like a winetest crash.
-                    # The cause of that is most likely a partial report file.
+                    # Mark this test as missing because of a winetest crash.
                     $test->{results}->{$testname} = ["winetest crash", "-", "-", "-"];
+                } elsif (defined $filelimit && $testname gt $filelimit) {
+                    # Mark this test as missing because of a partial report file.
+                    $test->{results}->{$testname} = ["file limit", "-", "-", "-"];
                 } else {
                     # Mark this test as missing for an unknown reason
                     $test->{results}->{$testname} = ["test missing", "-", "-", "-"];
@@ -234,7 +239,8 @@ sub singletest {
     my $file = "$test->{dir}/$testname.txt";
     my ($count, $todo, $error, $skipped) = @{$test->{results}->{$testname}};
     if ($count eq "failed") {
-        my $msg = $todo eq "-"?"crash":
+        my $msg = $todo eq "crash"?"crash":
+                  $todo eq "filelimit"?"file limit":
                   $todo == 258?"timeout":"failed";
         my $fail = -r "$datadir/$build/$file"?"<a href=\"$file\">$msg</a>":$msg;
         print OUT "      <td class=\"note\">$fail</td>\n";
@@ -253,6 +259,13 @@ EOF
         onMouseOver="Test did not run as winetest crashed";
         >.</a></td>
 EOF
+    } elsif ($count eq "file limit") {
+        print OUT <<"EOF";
+      <td class="skip_fail"><a
+        title="Test is missing because of a partial report file"
+        onMouseOver="Test is missing because of a partial report file";
+        >.</a></td>
+EOF
     } elsif ($count eq "test missing") {
         print OUT <<"EOF";
       <td class="skip_fail"><a
Index: tools/winetest/winetest.cgi
diff -u -p tools/winetest/winetest.cgi:1.8 tools/winetest/winetest.cgi:1.9
--- tools/winetest/winetest.cgi:1.8	8 Aug 2007 21:43: 2 -0000
+++ tools/winetest/winetest.cgi	8 Aug 2007 21:43: 2 -0000
@@ -17,7 +17,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 use strict;
-use vars qw/$queuedir/;
+use vars qw/$queuedir $maxfilesize/;
 
 BEGIN {
     require "winetest.conf";
@@ -26,8 +26,8 @@ BEGIN {
 
 use File::Temp qw(tempdir);
 use CGI qw(:standard);
-# This should be in line with programs\winetest\send.c
-$CGI::POST_MAX = 1.5 * 1024 * 1025;
+# Cater for some overhead
+$CGI::POST_MAX = $maxfilesize + 1024;
 
 my $name = param ("reportfile");
 my $error = cgi_error ();
Index: tools/winetest/winetest.conf
diff -u -p tools/winetest/winetest.conf:1.4 tools/winetest/winetest.conf:1.5
--- tools/winetest/winetest.conf:1.4	8 Aug 2007 21:43: 2 -0000
+++ tools/winetest/winetest.conf	8 Aug 2007 21:43: 2 -0000
@@ -1,6 +1,6 @@
 # Hey Emacs! This is a -*-cperl-*- file!
 
-$root = "/home/laxdragon/wine/tools/winetest";
+$root = "/wine/winetest";
 $builds = "$root/winetest.builds";
 # These two below should be on the same filesystem
 $queuedir = "$root/queue";
@@ -12,4 +12,8 @@ $maxmult = 10;
 # File version number
 $fileversion = 4;
 
+# Maximum size of the report file
+# This should be in line with programs\winetest\send.c
+$maxfilesize = 1.5 * 1024 * 1024;
+
 1;                              # keep require happy



More information about the wine-cvs mailing list