[TOOLS] Use skip information on test.winehq.org (RESEND)
Paul Vriens
paul.vriens.wine at gmail.com
Mon Mar 5 13:06:45 CST 2007
Hi,
I just thought to resend this as the winetest patch was accepted. Not applying
this patch (or a variant if needed) will mean no visible tests anymore on
test.winehq.org as of somewhere tomorrow afternoon (12-ish GMT when Paul runs
his new build cycle).
This patch adds the skip information to test.winehq.org. As the fileversion is
raised from 3 to 4 the new dissect and gather will only deal with new (that is
latest winetest executable) reports.
There will be (and can't because of the internal version checks) no problems
with mixed reports.
As the summary.js is changed as well that will have an effect on older winetest
result viewing (although I'm not a 100% sure how that's shown). This btw. is
only for people using the 'popup' window.
I've moved the $fileversion declaration to winetest.conf as it's used by both
dissect and gather (and should be the same).
It maybe wise to cleanup/archive the data directory anyway.
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 17:55:43 -0000
@@ -29,9 +29,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
use strict;
-use vars qw/$builds $queuedir $datadir $maxmult/;
+use vars qw/$builds $queuedir $datadir $maxmult $fileversion/;
require "winetest.conf";
-my $fileversion = 3;
use File::Temp qw/tempdir/;
use Errno qw/ENOTEMPTY/;
@@ -143,9 +142,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 +164,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 +183,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 +191,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 17:55:43 -0000
@@ -27,9 +27,8 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
use strict;
-use vars qw/$datadir/;
+use vars qw/$datadir $fileversion/;
require "winetest.conf";
-my $fileversion = 3;
# Group result containers. Keys:
# name: group name
@@ -94,10 +93,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 +214,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 +225,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 17:55:43 -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 17:55:43 -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;
}
}
Index: winetest/winetest.conf
===================================================================
RCS file: /home/wine/tools/winetest/winetest.conf,v
retrieving revision 1.3
diff -u -p -r1.3 winetest.conf
--- winetest/winetest.conf 29 Apr 2004 20:23:06 -0000 1.3
+++ winetest/winetest.conf 2 Mar 2007 17:55:43 -0000
@@ -9,4 +9,7 @@ $datadir = "$root/data";
# Maximum number of reports for one version and tag
$maxmult = 10;
+# File version number
+$fileversion = 4;
+
1; # keep require happy
More information about the wine-patches
mailing list