]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
check-eve: print full filename being tested
authorJason Ish <jason.ish@oisf.net>
Tue, 26 Oct 2021 15:45:43 +0000 (09:45 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 12 Nov 2021 22:07:28 +0000 (16:07 -0600)
With check-eve it makes more sense to print the full filename
being tested rather than just the test name.  As it is possible
that more than the expected eve.json is being tested.

check-eve.py

index 0c571d6bbe8c6f6c8f5e8df99b4a7ecc6ccb07ac..18e08e9a91350d1091375d6d4e5986bc95791a02 100755 (executable)
@@ -35,10 +35,6 @@ def validate_json(args, dirpath, schema, isDirectory):
     if isDirectory:
         json_filename = os.path.join(dirpath, 'eve.json')
         
-    testname = dirpath
-    if "suricata-verify" in dirpath:
-        testname = os.path.basename(os.path.dirname(dirpath))
-
     status = "OK"
     errors = []
 
@@ -53,12 +49,12 @@ def validate_json(args, dirpath, schema, isDirectory):
     
     if not args.quiet:
         if status == "FAIL":
-            print("===> %s: FAIL " % testname)
+            print("===> %s: FAIL " % json_filename)
 
             for err in errors:
                 print(err)
         elif args.verbose:
-            print("===> %s: OK " % testname)
+            print("===> %s: OK " % json_filename)
 
     return status