From: Philippe Antoine Date: Wed, 24 Nov 2021 20:54:55 +0000 (+0100) Subject: jsonschema: only run for version >= 7 X-Git-Tag: suricata-5.0.10~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d79500e4a879e25bfa7e44ca902cfd81acfcc9e5;p=thirdparty%2Fsuricata-verify.git jsonschema: only run for version >= 7 --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 124c6af7a..1488c8174 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -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 0c007c827..8b8845904 100755 --- 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: