[TOOLS/RFC] Use skip information on test.winehq.org

Paul Vriens paul.vriens.wine at gmail.com
Fri Mar 2 04:22:48 CST 2007


Hi,

This patch add the skip information to test.winehq.org. I'm not a 100% sure what
will happen to the already existing reports when summary.js is patched. This
however is only relevant for someone opening the popup window for old reports.

There could be an issue when somebody is running an old(er) winetest version and
sends the results to test.winehq.org. The summary.txt will be different for the
later added ones compared to the ones that are already there.

Should I change the fileversion (from 3 to 4)? In that case only new type
winetest reports will be accepted by test.winehq.org.

Any other remarks and/or suggestions?

Changelog
       Use skip information

Cheers,

Paul.





-------------- next part --------------
Index: winetest/dissect
===================================================================
RCS file: /home/wine/tools/winetest/dissect,v
retrieving revision 1.21
diff -u -p -r1.21 dissect
--- winetest/dissect	1 Mar 2007 18:30:28 -0000	1.21
+++ winetest/dissect	2 Mar 2007 10:10:21 -0000
@@ -143,9 +143,9 @@ if ($wine) {
 
 /Test output:\r?/ or mydie "no test header: $_";
 my ($unit, $test, $source, $rev, $result);
-my ($lines,$total, $todo, $failed);
+my ($lines,$total, $todo, $failed, $skipped);
 $unit = undef;                  # state machine starts
-$total = $todo = $failed = 0;
+$total = $todo = $failed = $skipped = 0;
 $lines = 0;
 while (<IN>) {
     if (!defined $unit) {       # new test
@@ -165,13 +165,14 @@ while (<IN>) {
         $total += $2;
         $todo += $3;
         $failed += $4;
+        $skipped += $5;
         print OUT;
     } elsif (s/$unit:$test done \((-?\d+)\)\r?$//) {
         chomp;                  # current test ended
         if ($lines==0) {
-            $result = "failed $1 -";
+            $result = "failed $1 - -";
         } else {
-            $result = "$total $todo $failed";
+            $result = "$total $todo $failed $skipped";
         }
       FINISH:
         print SUM "- $unit $test $result $source $rev\n";
@@ -183,7 +184,7 @@ while (<IN>) {
               mydie "can't rename $tmpfile to $testfile: $!\n";
         }
         $unit = undef;
-        $total = $todo = $failed = 0;
+        $total = $todo = $failed = $skipped = 0;
         $lines = 0;
     } else {                    # current test output
         print OUT;
@@ -191,7 +192,7 @@ while (<IN>) {
 }
 if (defined $unit) {
     $_="";
-    $result = "failed - -";
+    $result = "failed - - -";
     goto FINISH;
 }
 close SUM or mydie "error writing $tmpdir/summary.txt: $!";
Index: winetest/gather
===================================================================
RCS file: /home/wine/tools/winetest/gather,v
retrieving revision 1.17
diff -u -p -r1.17 gather
--- winetest/gather	11 Jan 2007 17:03:43 -0000	1.17
+++ winetest/gather	2 Mar 2007 10:10:21 -0000
@@ -94,10 +94,10 @@ foreach my $file (glob "$datadir/$build/
         next;
     }
     while (<TEST>) {
-        my ($digest, $unit, $test, $count, $todo, $error,
+        my ($digest, $unit, $test, $count, $todo, $error, $skipped,
             $source, $rev) = split;
         my $testname = "$unit:$test";
-        $testref->{results}->{$testname} = [$count, $todo, $error];
+        $testref->{results}->{$testname} = [$count, $todo, $error, $skipped];
         $alltests{$testname} = "http://cvs.winehq.org/cvsweb/wine/$source" . ($rev ne "-"?"#rev$rev":"")
             unless exists $alltests{$testname};
         if ($count ne "failed") {
@@ -215,7 +215,7 @@ sub singletest {
         print OUT "      <td class=\"${vis}note\">.</td>\n";
     } else {
         my $file = "$test->{dir}/$testname.txt";
-        my ($count, $todo, $error) = @{$test->{results}->{$testname}};
+        my ($count, $todo, $error, $skipped) = @{$test->{results}->{$testname}};
         if ($count eq "failed") {
             my $msg = $todo eq "-"?"crash":
                       $todo == 258?"timeout":"failed";
@@ -226,8 +226,8 @@ sub singletest {
             print OUT <<"EOF";
       <td class="$vis$class"><a
         href="$file"
-        title="$count tests, $todo TODO, $error errors"
-        onMouseOver="refresh('$testname','$groupname $test->{tag}',$count,$todo,$error);"
+        title="$count tests, $todo TODO, $error errors, $skipped skipped"
+        onMouseOver="refresh('$testname','$groupname $test->{tag}',$count,$todo,$error,$skipped);"
         >$error</a></td>
 EOF
         }
Index: winetest/resultform.html
===================================================================
RCS file: /home/wine/tools/winetest/resultform.html,v
retrieving revision 1.1
diff -u -p -r1.1 resultform.html
--- winetest/resultform.html	19 Feb 2004 22:00:34 -0000	1.1
+++ winetest/resultform.html	2 Mar 2007 10:10:21 -0000
@@ -34,6 +34,10 @@
       <td>Errors:</td>
       <td><input type="text" name="errors" size="6" readonly></td>
     </tr>
+    <tr>
+      <td>Skipped:</td>
+      <td><input type="text" name="skipped" size="6" readonly></td>
+    </tr>
 </form>
 </body>
 </html>
Index: winetest/summary.js
===================================================================
RCS file: /home/wine/tools/winetest/summary.js,v
retrieving revision 1.2
diff -u -p -r1.2 summary.js
--- winetest/summary.js	11 Jan 2005 16:00:44 -0000	1.2
+++ winetest/summary.js	2 Mar 2007 10:10:22 -0000
@@ -9,7 +9,7 @@ function isopen () {
     return result_window && result_window.document && result_window.document.results;
 }
 
-function refresh (test, version, tests, todo, errors) {
+function refresh (test, version, tests, todo, errors, skipped) {
     if (isopen ()) {
         var form = result_window.document.results;
         form.test.value = test;
@@ -17,6 +17,7 @@ function refresh (test, version, tests, 
         form.tests.value = tests;
         form.todo.value = todo;
         form.errors.value = errors;
+        form.skipped.value = skipped;
         result_window.focus ();
     }
 }
@@ -31,5 +32,6 @@ function clone () {
         cf.tests.value = rf.tests.value;
         cf.todo.value = rf.todo.value;
         cf.errors.value = rf.errors.value;
+        cf.skipped.value = rf.skipped.value;
     }
 }






More information about the wine-devel mailing list