]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
runner: raise UnsatisfiedRequirementError for windows shell checks
authorJason Ish <jason.ish@oisf.net>
Sun, 6 Jul 2025 17:31:52 +0000 (11:31 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 15 Jul 2025 14:40:39 +0000 (16:40 +0200)
Instead of just printing that shell checks are not supported on
Windows, properly skip the test so it is counted as skipped.

run.py

diff --git a/run.py b/run.py
index 1b3ade35e3c5c10b89b9e44814a768544732ecb5..f9967eaa38028f1d46b2fc557e3e932fae12594d 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -469,8 +469,7 @@ class FileCompareCheck:
 
     def run(self):
         if WIN32:
-            print("skipping shell check on windows")
-            return True;
+            raise UnsatisfiedRequirementError("shell check not supported on Windows")
         expected = os.path.join(self.directory, self.config["expected"])
         filename = self.config["filename"]
         try:
@@ -505,8 +504,7 @@ class ShellCheck:
 
         try:
             if WIN32:
-                print("skipping shell check on windows")
-                return True;
+                raise UnsatisfiedRequirementError("shell check not supported on Windows")
             output = subprocess.check_output(self.config["args"], shell=True, env=self.env)
             if "expect" in self.config:
                 return str(self.config["expect"]) == output.decode().strip()