[tools] testbot/TestAgent: Simplify the implementation for commands with no argument.

Francois Gouget fgouget at codeweavers.com
Fri Apr 1 10:09:18 CDT 2022


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/scripts/TestAgent | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index ea18b85b7..a3d6e2625 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -210,15 +210,7 @@ while (@ARGV)
         @Rm = @ARGV;
         last;
     }
-    elsif ($arg eq "getcwd")
-    {
-        $Cmd = $arg;
-    }
-    elsif ($arg eq "getversion")
-    {
-        set_cmd($arg);
-    }
-    elsif ($arg eq "ping" or $arg eq "settime")
+    elsif ($arg =~ /^(?:getcwd|getversion|ping|settime)$/)
     {
         set_cmd($arg);
     }
-- 
2.30.2




More information about the wine-devel mailing list