tools/winetest gather

Jeremy Newman jnewman at wine.codeweavers.com
Mon Aug 6 10:49:32 CDT 2007


ChangeSet ID:	31316
CVSROOT:	/opt/cvs-commit
Module name:	tools
Changes by:	jnewman at winehq.org	2007/08/06 10:49:32

Modified files:
	winetest       : gather 

Log message:
	Paul Vriens <paul.vriens.wine at gmail.com>
	Show missing tests in summary/group results

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

Old revision  New revision  Changes     Path
 1.21          1.22          +33 -15     tools/winetest/gather

Index: tools/winetest/gather
diff -u -p tools/winetest/gather:1.21 tools/winetest/gather:1.22
--- tools/winetest/gather:1.21	6 Aug 2007 15:49:32 -0000
+++ tools/winetest/gather	6 Aug 2007 15:49:32 -0000
@@ -121,6 +121,22 @@ foreach my $file (glob "$datadir/$build/
     push @{$group->{tests}}, $testref;
 }
 
+# Find missing tests. After this exercise all testresults (correct, failed and missing) are available
+# for all systems.
+foreach my $group (@groups) {
+    next unless exists $group->{tests};
+    foreach my $test (@{$group->{tests}}) {
+        foreach my $testname (sort keys %alltests) {
+            if (!exists $test->{results}->{$testname}) {
+                # Make sure missing tests are shown in the group results
+                $group->{digests}->{$testname} = "differ";
+                # Mark this test as missing for an unknown reason
+                $test->{results}->{$testname} = ["test missing", "-", "-", "-"];
+            }
+        }
+    }
+}
+
 # Write out the tables
 
 my ($header);                   # same in thead and tfoot
@@ -201,28 +217,30 @@ EOF
 # Output a single cell of a test
 sub singletest {
     my ($test, $testname, $groupname) = @_;
-
-    if (!exists $test->{results}->{$testname}) {
-        print OUT "      <td class=\"note\">.</td>\n";
+    my $file = "$test->{dir}/$testname.txt";
+    my ($count, $todo, $error, $skipped) = @{$test->{results}->{$testname}};
+    if ($count eq "failed") {
+        my $msg = $todo eq "-"?"crash":
+                  $todo == 258?"timeout":"failed";
+        my $fail = -r "$datadir/$build/$file"?"<a href=\"$file\">$msg</a>":$msg;
+        print OUT "      <td class=\"note\">$fail</td>\n";
+    } elsif ($count eq "test missing") {
+        print OUT <<"EOF";
+      <td class="skip_fail"><a
+        title="Test did not run for an unknown reason"
+        onMouseOver="Test did not run for an unknown reason";
+        >.</a></td>
+EOF
     } else {
-        my $file = "$test->{dir}/$testname.txt";
-        my ($count, $todo, $error, $skipped) = @{$test->{results}->{$testname}};
-        if ($count eq "failed") {
-            my $msg = $todo eq "-"?"crash":
-                      $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";
-            my $skip = $skipped?"skip_":"";
-            print OUT <<"EOF";
+        my $class = $error?"fail":"pass";
+        my $skip = $skipped?"skip_":"";
+        print OUT <<"EOF";
       <td class="$skip$class"><a
         href="$file"
         title="$count tests, $todo TODO, $error errors, $skipped skipped"
         onMouseOver="refresh('$testname','$groupname $test->{tag}',$count,$todo,$error,$skipped);"
         >$error</a></td>
 EOF
-        }
     }
 }
 



More information about the wine-cvs mailing list