[Tools] winetest: Let dissect detect and report crashes.

Francois Gouget fgouget at codeweavers.com
Tue Jun 13 03:36:49 CDT 2017


A 'failed crash' line in the summary.txt file now identifies tests that
crashed. This way gather does not have to duplicate the dissect code to
correctly identify crashed tests (except temporarily for backward
compatibility with old summary.txt files).

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

Essentially a later patch will remove the checks for status "-2" and 
/^-/.


 winetest/dissect | 2 +-
 winetest/gather  | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/winetest/dissect b/winetest/dissect
index 4901e972..1ecbd94e 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -465,7 +465,7 @@ while (<IN>) {
     } elsif (/$dll:$unit(?::[0-9a-f]+)? done \((-?\d+)\)(?:\r?$| in)/) {
         chomp;                  # current test ended
         if ($lines==0 || $1 < 0) {
-            $result = "failed $1 - -";
+            $result = "failed ". ($1 < 0 ? "crash" : $1) ." - -";
             my $reason = "test failed: error $1";
             if ($1 == 258) { $reason = "test failed: timed out"; }
             elsif ($1 < 0) { $reason = "test failed: crash"; }
diff --git a/winetest/gather b/winetest/gather
index 907b2050..fbf03975 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -324,7 +324,9 @@ foreach my $file (glob "$builddir/*/summary.txt") {
         $alltests{$testname} = $source;
 
         if ($count eq "failed") {
-            if ($todos eq "filelimit") {
+            if ($todos eq "crash") {
+                $report->{$testname} = { status => "crash" };
+            } elsif ($todos eq "filelimit") {
                 $report->{$testname} = { status => "file limit" };
                 $report->{filelimit} = $testname;
             } else {
-- 
2.11.0



More information about the wine-patches mailing list