Module: tools Branch: master Commit: 5816ad63defc099feffd5d40cc3e52f672221d41 URL: https://source.winehq.org/git/tools.git/?a=commit;h=5816ad63defc099feffd5d40...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon Jul 5 18:18:27 2021 +0200
winetest: Detect and report tests blocked by anti-virus tools.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
winetest/build-patterns | 1 + winetest/dissect | 5 +++++ winetest/gather | 10 ++++++++-- winetest/report.css | 3 +++ 4 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index da7272e..b8ad628 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -929,6 +929,7 @@ my %status2html = ( "missingsxs" => ["v", "v", "missing side-by-side dll version", "version", ""], "stub" => ["u", "u", "stub Windows dll", "version", ""], "native" => ["N", "N", "native Windows dll", "version", ""], + "loaderror225" => ["V", "V", "blocked by the anti-virus", "version", ""], "loaderror258" => ["I", "I", "timed out while getting the test list", "version", ""], # Other status values "skipped" => ["-", "s", "skipped by user request", "", ""], diff --git a/winetest/dissect b/winetest/dissect index 33cfb0a..cf265d2 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -932,6 +932,11 @@ foreach my $dll (sort keys %dllinfo) $box->{data} .= sprintf "<td>%s</td><td class="failed">timed out getting the test list</td></tr>\n", escapeHTML($dll); } + elsif ($dllinfo{$dll}->{version} eq "load error 225") + { + $box->{data} .= sprintf "<td>%s</td><td class="failed">test blocked by the anti-virus</td></tr>\n", + escapeHTML($dll); + } elsif ($dllinfo{$dll}->{version} =~ /^load error (\d+)$/) { # Flag unknown errors diff --git a/winetest/gather b/winetest/gather index abb3395..755af18 100755 --- a/winetest/gather +++ b/winetest/gather @@ -656,8 +656,10 @@ sub get_result_title($$) if ($result->{status} =~ /^loaderror(.*)$/) { my $code = $1; - return "Not run because getting the test list ". - ($code eq "258" ? "timed out" : "failed with error $code"); + return $code eq "225" ? + "Not run because the test was blocked by the anti-virus" : + ("Not run because getting the test list ". + ($code eq "258" ? "timed out" : "failed with error $code")); } if ($result->{status} eq "native") { return "Not run because $dll is a native Windows dll (not allowed for Wine tests)"; } if ($result->{status} eq "stub") { return "Not run because $dll is a stub Windows dll"; } @@ -709,6 +711,10 @@ sub singletest($$$) { !$result->{errors}->[1] ? $result->{todos}->[1] : "$result->{errors}->[1]+$result->{todos}->[1]"; } + elsif ($status eq "loaderror225") + { + $msg = "virus"; + } elsif ($status =~ /^loaderror/) { $msg = "no list"; diff --git a/winetest/report.css b/winetest/report.css index b558c6f..b8b67b9 100644 --- a/winetest/report.css +++ b/winetest/report.css @@ -113,6 +113,9 @@ div.pattern :hover { color: black; text-decoration: underline; } .patL { /* error while getting the test list */ background-color: #80aaff; } +.patV { /* test blocked by the anti-virus */ + background-color: #99e6ff; +}
.commitR { color: #cc0000;