]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
jsonschema: only run for version >= 7
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 24 Nov 2021 20:54:55 +0000 (21:54 +0100)
committerJason Ish <jason.ish@oisf.net>
Fri, 3 Jun 2022 19:55:44 +0000 (13:55 -0600)
.github/workflows/builds.yml
run.py

index 124c6af7a025e2e6746a9cdbf29ed27d5d7d31f9..1488c81743bbdd1b57236728e3fb1f37106a2803 100644 (file)
@@ -89,6 +89,7 @@ jobs:
         working-directory: suricata
         run: python3 ../run.py --quiet
       - name: Running check-eve
+        if: ${{ matrix.branch == 'master' }}
         run: python3 ./check-eve.py
       - name: Running suricata-verify with different output dir
         working-directory: suricata
@@ -167,4 +168,5 @@ jobs:
         working-directory: suricata
         run: python3 ../run.py --quiet
       - name: Running check-eve
+        if: ${{ matrix.branch == 'master' }}
         run: python3 ./check-eve.py
diff --git a/run.py b/run.py
index 0c007c827780b4c4699c9a3b2f453415dec16be3..8b8845904a8dea9ad05b29dd624a56b39c771655 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -45,6 +45,7 @@ import subprocess
 import yaml
 
 # Check if we can validate EVE files against the schema.
+global VALIDATE_EVE
 try:
     VALIDATE_EVE = True
     check_output = subprocess.run(["eve-validator", "-V"], capture_output=True)
@@ -950,6 +951,7 @@ def main():
     if args.self_test:
         return unittest.main(argv=[sys.argv[0]])
 
+    global VALIDATE_EVE
     if not VALIDATE_EVE:
         print("Warning: EVE files will not be valided: eve-validator program not found.")
 
@@ -970,6 +972,9 @@ def main():
 
     # Create a SuricataConfig object that is passed to all tests.
     suricata_config = SuricataConfig(get_suricata_version())
+    # only validate eve since version 7
+    if not is_version_compatible(version="7", suri_version=suricata_config.version, expr="gte"):
+        VALIDATE_EVE = False
     suricata_config.valgrind = args.valgrind
     tdir = os.path.join(TOPDIR, "tests")
     if args.testdir: