]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
run: fix --force to force running of skipped tests
authorJason Ish <jason.ish@oisf.net>
Wed, 20 Nov 2019 21:45:05 +0000 (15:45 -0600)
committerJason Ish <jason.ish@oisf.net>
Thu, 21 Nov 2019 17:09:24 +0000 (11:09 -0600)
run.py

diff --git a/run.py b/run.py
index 711491e61eeaf61900b0a99848cdf1a8ce6c1d47..b6716ef845ede6b7c9959a892133622c811d0bde 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -342,11 +342,12 @@ class FilterCheck:
 
 class TestRunner:
 
-    def __init__(self, cwd, directory, outdir, suricata_config, verbose=False):
+    def __init__(self, cwd, directory, outdir, suricata_config, verbose=False, force=False):
         self.cwd = cwd
         self.directory = directory
         self.suricata_config = suricata_config
         self.verbose = verbose
+        self.force = force
         self.output = outdir
 
         # The name is just the directory name.
@@ -498,8 +499,9 @@ class TestRunner:
         sys.stdout.write("===> %s: " % os.path.basename(self.directory))
         sys.stdout.flush()
 
-        self.check_requires()
-        self.check_skip()
+        if not self.force:
+            self.check_requires()
+            self.check_skip()
 
         if WIN32 and os.path.exists(os.path.join(self.directory, "check.sh")):
             raise UnsatisfiedRequirementError("check.sh tests are not supported on Windows")
@@ -858,7 +860,7 @@ def main():
             outdir = os.path.join(os.path.realpath(args.outdir), name, "output")
 
         test_runner = TestRunner(
-            cwd, dirpath, outdir, suricata_config, args.verbose)
+            cwd, dirpath, outdir, suricata_config, args.verbose, args.force)
         try:
             results = test_runner.run()
             passed += results["success"]