Module: tools
Branch: master
Commit: 23a7f808b7229d2778c9d0f035020fb917eb94d5
URL: http://source.winehq.org/git/tools.git/?a=commit;h=23a7f808b7229d2778c9d0f0…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Thu Mar 27 20:06:55 2008 +0100
winetest.cron: Move old test results out of the way.
---
winetest/winetest.cron | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/winetest/winetest.cron b/winetest/winetest.cron
index 58ed741..e4129db 100755
--- a/winetest/winetest.cron
+++ b/winetest/winetest.cron
@@ -8,5 +8,17 @@ if [ ! -f $lock ]; then
touch $lock
while perl dissect; [ $? -eq 0 -o $? -eq 1 ]; do true; done
while perl gather; do true; done
+
+ # move 2-month old results out of the way
+ for i in `find ./data -maxdepth 1 -mtime +60 -type d -print`
+ do
+ mv $i old-data
+ done
+
+ # and archive 6-month old results
+ (cd old-data && for i in `find . -maxdepth 1 -mtime +180 -type d -print`
+ do
+ tar cfj $i.tar.bz2 $i && rm -rf $i
+ done)
rm $lock
fi
Module: tools
Branch: master
Commit: 96b313c46dc90f41e5b6e3f7922f8c795a021e04
URL: http://source.winehq.org/git/tools.git/?a=commit;h=96b313c46dc90f41e5b6e3f7…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Wed Mar 26 23:39:17 2008 +0100
winetest: Add statistics for the number of unit tests with errors or todos.
Also tweak the headers and footers a bit.
---
winetest/gather | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 62 insertions(+), 5 deletions(-)
diff --git a/winetest/gather b/winetest/gather
index 78fa99a..dc2b598 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -68,6 +68,8 @@ my $summary_version=4;
# <testname> Maps the test names to a structure containing the individual
# unit test's results. Note that there's no name collision
# with the other fields because the test names contain a ':'.
+# errors The number of unit tests with errors.
+# todos The number of unit tests with no error but todos.
#
# Group result containers:
# name Group name.
@@ -76,6 +78,8 @@ my $summary_version=4;
# result of the group's reports for that unit test. Note that
# there's no name collision with the other fields because the
# test names contain a ':'.
+# errors The number of unit tests with errors.
+# todos The number of unit tests with no error but todos.
my %w95 = (name => "Win95");
my %w98 = (name => "Win98");
@@ -271,13 +275,44 @@ foreach my $group (@groups) {
}
}
+# Compute some statistics
+
+foreach my $group (@groups) {
+ next unless exists $group->{reports};
+ foreach my $report (@{$group->{reports}}, $group) {
+ $report->{errors} = 0;
+ $report->{todos} = 0;
+ foreach my $testname (sort keys %alltests) {
+ my $result = $report->{$testname};
+ if ($result->{status} !~ /^(?:dll missing|run)$/ or
+ ($result->{status} eq "run" and
+ $result->{errors}->[1] != 0))
+ {
+ $report->{errors}++;
+ }
+ elsif ($result->{status} eq "run" and
+ $result->{todos}->[1] != 0)
+ {
+ $report->{todos}++;
+ }
+ }
+ }
+}
+
# Write out the tables
+sub percent($$)
+{
+ my ($value, $base)=@_;
+ return sprintf("%4.1f", 100 * $value / $base);
+}
+
sub build_header_footer($)
{
my ($reports)=@_;
- my $title;
+ my $unit_count=scalar(keys %alltests);
+ my ($title, $stats);
foreach my $rep (@{$reports}) {
my $report=$rep;
my $msg;
@@ -318,18 +353,40 @@ EOF
$msg
</th>
EOF
+
+ my $class = $report->{errors} ? "fail" :
+ $report->{todos} ? "todo" :
+ "pass";
+ my $count=!$report->{todos} ? $report->{errors} :
+ !$report->{errors} ? $report->{todos} :
+ "$group->{errors}+$group->{todos}";
+
+ my $prcnt=!$report->{todos} ? percent($report->{errors}, $unit_count) :
+ !$report->{errors} ? percent($report->{todos}, $unit_count) :
+ (percent($report->{errors}, $unit_count) . "+" .
+ percent($report->{todos}, $unit_count));
+ $stats .= " <th class=\"$class\"><a title=\"$unit_count unit tests, $report->{errors} have errors, $report->{todos} have todos\">$count<br>$prcnt\%</a></th>\n";
}
chop $title;
+ chop $stats;
return <<"EOF";
<thead>
<tr>
- <th class="test">dll:unit_test</th>
+ <th class="test">platforms</th>
$title
</tr>
+ <tr>
+ <th class="test">errors</th>
+$stats
+ </tr>
</thead>
<tfoot>
<tr>
- <th class="test">dll:unit_test</th>
+ <th class="test">errors</th>
+$stats
+ </tr>
+ <tr>
+ <th class="test">platforms</th>
$title
</tr>
</tfoot>
@@ -489,7 +546,7 @@ foreach my $testname (sort keys %alltests) {
print OUT <<"EOF";
<tr>
<td class="test">
- <a href="$alltests{$testname}">$testname</a></td>
+ <a href="$alltests{$testname}" title="dll:unit_test source">$testname</a></td>
EOF
foreach my $group (@groups) {
if (!exists $group->{reports}) {
@@ -524,7 +581,7 @@ EOF
print OUT <<"EOF";
<tr>
<td class="test">
- <a href="$alltests{$testname}" name="group_$group->{name}:$testname">$testname</a></td>
+ <a href="$alltests{$testname}" name="group_$group->{name}:$testname" title="dll:unit_test source">$testname</a></td>
EOF
foreach my $report (@{$group->{reports}}) {
singletest($report, $testname, $group->{name});
Module: tools
Branch: master
Commit: 29d147655026c0e6adf449c6c02a1c80ac9e88fb
URL: http://source.winehq.org/git/tools.git/?a=commit;h=29d147655026c0e6adf449c6…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Wed Mar 26 23:37:17 2008 +0100
winetest: Fix merging of the individual test results into one group result, especially when they all report the dll is missing or that the test crashed, etc.
Merge all the data for a given unit test to a single structure instead of scattering them into multiple hashtables.
The new result data structure makes it possible for the same code to work for both group and individual report results.
---
winetest/gather | 333 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 204 insertions(+), 129 deletions(-)
Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=29d147655026c0e6adf4…
Module: tools
Branch: master
Commit: 8dbd65b19d1686a559383bfdefc49bb67d4fe630
URL: http://source.winehq.org/git/tools.git/?a=commit;h=8dbd65b19d1686a559383bfd…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Wed Mar 26 23:35:46 2008 +0100
winetest: Rename the 'crash' report field to 'winetestcrash' to avoid confusion.
---
winetest/gather | 49 +++++++++++++++++++++++++------------------------
1 files changed, 25 insertions(+), 24 deletions(-)
diff --git a/winetest/gather b/winetest/gather
index 8cfd1ab..d032e23 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -38,30 +38,31 @@ my $summary_version=4;
# Group result containers:
-# name Group name
-# extrema Hashes test names to an array containing the minimum and maximum
-# number of errors for the test across the group's reports
-# todo Hashes test names to the maximum number of todos for that test
-# skipped Hashes test names to the maximum number of skips for that test
-# digests Hashes test names to a string which is 'differ' if the test
-# should be shown in the group's results table
-# reports An array of report result containers
+# name Group name
+# extrema Hashes test names to an array containing the minimum and
+# maximum number of errors for the test across the group's
+# reports
+# todo Hashes test names to the maximum number of todos for that test
+# skipped Hashes test names to the maximum number of skips for that test
+# digests Hashes test names to a string which is 'differ' if the test
+# should be shown in the group's results table
+# reports An array of report result containers
#
# Report result containers:
-# tag The report's tag
-# dir The directory containing the report data (log files, etc).
-# dllmissing A hash of the missing dlls for that system
-# crash The name of the last test that was run before winetest crashed
-# filelimit The name of the last test that was run before the report file
-# size limit was reached
-# results Hashes test names to an array containing that test's results:
-# [ count, todos, errors, skips ]
-# Where:
-# count Is the number of checks in that test or a string
-# describing the test failure
-# todos Is the number of todo checks
-# errors Is the number of checks that failed
-# skips Is the number of times checks were skipped
+# tag The report's tag
+# dir The directory containing the report data (log files, etc).
+# dllmissing A hash of the missing dlls for that system
+# winetestcrash The name of the last test that was run before winetest crashed
+# filelimit The name of the last test that was run before the report file
+# size limit was reached
+# results Hashes test names to an array containing that test's results:
+# [ count, todos, errors, skips ]
+# Where:
+# count Is the number of checks in that test or a string
+# describing the test failure
+# todos Is the number of todo checks
+# errors Is the number of checks that failed
+# skips Is the number of times checks were skipped
my %w95 = (name => "Win95");
my %w98 = (name => "Win98");
my %me = (name => "Me");
@@ -172,7 +173,7 @@ foreach my $file (glob "$datadir/$build/*/summary.txt") {
}
}
} elsif ($todo eq "crash") {
- $report->{crash} = $testname;
+ $report->{winetestcrash} = $testname;
} elsif ($todo eq "filelimit") {
$report->{filelimit} = $testname;
}
@@ -195,7 +196,7 @@ foreach my $group (@groups) {
# Make sure missing tests are shown in the group results
$group->{digests}->{$testname} = "differ";
my ($dll, $unit) = split(/:/, $testname);
- my $crash = $report->{crash};
+ my $crash = $report->{winetestcrash};
my $filelimit = $report->{filelimit};
if (exists $report->{dllmissing}->{$dll}) {
# Mark this test as missing because of a missing dll