Francois Gouget : winetest/gather: Simplify the result status to cell label conversion.

Alexandre Julliard julliard at winehq.org
Wed Apr 21 15:48:23 CDT 2021


Module: tools
Branch: master
Commit: d260ee7c3a64a10560b61744e2b4a8e96f6a86fb
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=d260ee7c3a64a10560b61744e2b4a8e96f6a86fb

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Apr 21 16:26:39 2021 +0200

winetest/gather: Simplify the result status to cell label conversion.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/gather | 32 ++++++++++----------------------
 1 file changed, 10 insertions(+), 22 deletions(-)

diff --git a/winetest/gather b/winetest/gather
index a3a0a65..456fa0b 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -735,30 +735,18 @@ sub singletest($$$) {
              !$result->{errors}->[1] ? $result->{todos}->[1] :
              "$result->{errors}->[1]+$result->{todos}->[1]";
     }
-    elsif ($status eq "dll missing")
-    {
-        $msg = "n/a";
-    }
-    elsif ($status eq "filelimit")
-    {
-        $msg = "truncated";
-    }
-    elsif ($status eq "missing")
-    {
-        $msg = "not run";
-    }
-    elsif ($status eq "skipped")
-    {
-        $msg = "skipped";
-    }
-    elsif ($status eq "mixed")
-    {
-        $msg = "mixed";
-    }
     else
     {
-        $msg = $status eq "crash" ? "crashed" :
-               $status eq "258" ? "timeout": "failed";
+        my %status2label = (
+            missing           => "not run",
+            "dll missing"     => "n/a",
+            skipped           => "skipped",
+            crash             => "crashed",
+            258               => "timeout",
+            mixed             => "mixed",
+            filelimit         => "truncated",
+        );
+        $msg = $status2label{$status} || "failed";
     }
     $title = join(" | ", $prefix, $title);
     printf OUT "      <td class=\"%s\"><a %s %s>%s</a></td>\n",




More information about the wine-cvs mailing list