]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
remove requires.not-features support: use skip instead
authorJason Ish <ish@unx.ca>
Thu, 18 Jan 2018 16:21:47 +0000 (10:21 -0600)
committerJason Ish <ish@unx.ca>
Thu, 18 Jan 2018 16:21:47 +0000 (10:21 -0600)
README.md
run.py
tests/dns-lua-rules/test.yaml
tests/dns-udp-dns-log-unanswered/test.yaml
tests/dns-udp-unsolicited-response/test.yaml

index c4721540ffc7cc4cebe9e23dcca73c0af52c11a6..5a0a89dda705f1d449a9df1e9644e294eea15318 100644 (file)
--- a/README.md
+++ b/README.md
@@ -57,10 +57,6 @@ requires:
     # Restrict the test to builds with HAVE_LUA.
     - HAVE_LUA
 
-  # Require that Suricata not be built with specific features.
-  not-features:
-    RUST: option reason
-
   # Don't require a pcap file to be present. By default a test will be skipped
   # if there is no pcap file in the test directory. Not applicable if a
   # command is provided.
diff --git a/run.py b/run.py
index 2b8afafa469aeb06ec3813ebe1edd9c26589ba45..1233cdb2f027d6326f63d996f92aa6885f385e02 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -243,6 +243,7 @@ class TestRunner:
         if not "skip" in self.config:
             return
         for skip in self.config["skip"]:
+
             if "uid" in skip:
                 if os.getuid() == skip["uid"]:
                     if "msg" in skip:
@@ -251,6 +252,14 @@ class TestRunner:
                         msg = "not for uid %d" % (skip["uid"])
                     raise UnsatisfiedRequirementError(msg)
 
+            if "feature" in skip:
+                if self.suricata_config.has_feature(skip["feature"]):
+                    if "msg" in skip:
+                        msg = skip["msg"]
+                    else:
+                        msg = "not for feature %s" % (skip["feature"])
+                    raise UnsatisfiedRequirementError(msg)
+
     def check_requires(self):
         if "requires" in self.config:
             requires = self.config["requires"]
@@ -270,16 +279,6 @@ class TestRunner:
                     raise UnsatisfiedRequirementError(
                         "requires feature %s" % (feature))
 
-        if "not-features" in requires:
-            for feature in requires["not-features"]:
-                if self.suricata_config.has_feature(feature):
-                    if requires["not-features"][feature]:
-                        comment = "%s" % (
-                            requires["not-features"][feature])
-                    else:
-                        comment = "not for feature %s" % (feature)
-                    raise UnsatisfiedRequirementError(comment)
-
         if "env" in requires:
             for env in requires["env"]:
                 if not env in os.environ:
index 79ff97513a1fc0b927b137ee9b3a7ebdca85086d..e3fc984da4094ec3121dc75f9cfc751ad0c1f894 100644 (file)
@@ -1,8 +1,10 @@
 requires:
   features:
     - HAVE_LUA
-  not-features:
-    RUST: known issue with feature RUST
+
+skip:
+  - feature: RUST
+    msg: Known issue with feature RUST
 
 checks:
   - filter:
index d00be748594df553058087a58398d1726ec2fad3..6af8ec795a3c2136680e6b7bc2f2ae23c193ab23 100644 (file)
@@ -1,4 +1,2 @@
-requires:
-  # Test will be skipped if any of these features are present.
-  not-features:
-    RUST:
+skip:
+  - feature: RUST
index 0546b5b1e3e3ffd48714e6c7bcd58a18d0c6c546..1d9dd5bcbac42b7372469bff180e4303119c9602 100644 (file)
@@ -1,6 +1,6 @@
 requires:
-  # Test will be skipped if any of these features are present.
-  not-features:
-    RUST:
   features:
     - HAVE_LIBJANSSON
+
+skip:
+  - feature: RUST