Francois Gouget : winetest: Identify and highlight tests with too much output.
Alexandre Julliard
julliard at winehq.org
Wed Jul 7 14:50:35 CDT 2021
Module: tools
Branch: master
Commit: d263eac1c8f55032b6ea996da37320bff9941182
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d263eac1c8f55032b6ea996da37320bff9941182
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Jul 5 18:18:44 2021 +0200
winetest: Identify and highlight tests with too much output.
Regular failures are more important so only highlight this problem if
the test has no other issue.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51352
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
winetest/build-patterns | 1 +
winetest/dissect | 9 +++++++--
winetest/gather | 12 ++++++++++--
winetest/report.css | 3 +++
4 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns
index b8ad628..d530ad2 100755
--- a/winetest/build-patterns
+++ b/winetest/build-patterns
@@ -935,6 +935,7 @@ my %status2html = (
"skipped" => ["-", "s", "skipped by user request", "", ""],
"crash" => ["C", "C", "crash", "t", ""],
"258" => ["T", "T", "timeout", "t", ""],
+ "big" => ["B", "B", "too much output", "t", ""],
);
# Returns a tuple containing the symbol, CSS class, title, link type and
diff --git a/winetest/dissect b/winetest/dissect
index cf265d2..55d0a72 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -267,7 +267,7 @@ open IN, "<:raw", $report or mydie "could not open '$report' for reading: $!";
# - <dll> - skipped - - - -
# - <dll> <unit> skipped - - - <source>
# - <dll> <unit> failed (258|crash) - - <source>
-# - <dll> <unit> <total> <todo> <failures> <skipped> <source>
+# - <dll> <unit> <total> <todo> (<failures>|big) <skipped> <source>
open SUM, ">$tmpdir/summary.txt" or mydie "could not open '$tmpdir/summary.txt' for writing: $!";
my $line = <IN> || "";
@@ -599,10 +599,12 @@ sub close_test_unit($)
$todo ||= $s_todo;
$skipped ||= $s_skipped;
+ my $toobig;
if ($unitsize > $maxunitsize)
{
add_test_line("end", "The test prints too much data ($unitsize bytes)");
$extra_failures++;
+ $toobig = 1;
}
if (!$broken and defined $rc)
{
@@ -637,7 +639,10 @@ sub close_test_unit($)
}
$failures += $extra_failures;
- $summary = "$s_total $todo $failures $skipped" if (!defined $summary);
+ if (!defined $summary)
+ {
+ $summary = "$s_total $todo " . (($toobig and $failures == 1) ? "big" : $failures) . " $skipped";
+ }
print SUM "- $dll $unit $summary $source\n";
$testbox->{pattern} = "$dll:$unit" if ($failures);
if ($failures && ++$failed_units > $maxfailedtests) {
diff --git a/winetest/gather b/winetest/gather
index 755af18..5aabe4e 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -356,7 +356,12 @@ foreach my $file (glob "$builddir/*/summary.txt") {
skips => [ 1, 1 ]
};
} else {
- $report->{$testname} = { status => "run",
+ my $status = "run";
+ if ($errors eq "big") {
+ $status = "big";
+ $errors = 1;
+ }
+ $report->{$testname} = { status => $status,
count => [ $count, $count ],
errors => [ $errors, $errors ],
todos => [ $todos, $todos ],
@@ -409,7 +414,8 @@ sub merge_status($$)
} elsif ($group_result->{status} eq "run" and
$result->{status} =~ /^missing/) {
; # Nothing to do
- } elsif ($group_result->{status} ne $result->{status}) {
+ } elsif (($group_result->{status} =~ /^(?:run|big)$/) ne
+ ($result->{status} =~ /^(?:run|big)$/)) {
$group_result->{status} = "mixed";
}
@@ -640,6 +646,7 @@ sub get_result_title($$)
if ($result->{status} eq "mixed") { return "Mixed results"; }
if ($result->{status} eq "crash") { return "Test crashed"; }
if ($result->{status} eq "258") { return "Test timed out"; }
+ if ($result->{status} eq "big") { return "Too much output"; }
if ($result->{status} eq "skipped") { return "Skipped by user request"; }
my ($dll, $unit) = split(/:/, $testname);
@@ -731,6 +738,7 @@ sub singletest($$$) {
skipped => "skipped",
native => "native",
crash => "crashed",
+ big => "too big",
258 => "timeout",
mixed => "mixed",
);
diff --git a/winetest/report.css b/winetest/report.css
index b8b67b9..4594c5d 100644
--- a/winetest/report.css
+++ b/winetest/report.css
@@ -92,6 +92,9 @@ div.pattern :hover { color: black; text-decoration: underline; }
background-color: #ff5555;
}
/* .patF failure(s) */
+.patB { /* too much output */
+ background-color: #ffffb3;
+}
/* .patn not run for an unknown reason */
/* .patm missing dll */
.pate { /* missing entrypoint */
More information about the wine-cvs
mailing list