]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
run.py: Add dir in the output 1217/head
authorAlice Akaki <akakialice@gmail.com>
Tue, 1 Nov 2022 05:05:00 +0000 (01:05 -0400)
committerJason Ish <jason.ish@oisf.net>
Wed, 24 May 2023 18:03:26 +0000 (12:03 -0600)
These changes were based on Blithe Brandon's PR #344
Task: #3144

run.py

diff --git a/run.py b/run.py
index 4779aaa3799c51c1b001360e06f7ce20419e9c27..8f8d8ead4fd3dfd03507ce230fa2fa70634e03cd 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -770,7 +770,11 @@ class TestRunner:
 
         if not check_value["failure"] and not check_value["skipped"]:
             if not self.quiet:
-                print("===> %s: OK%s" % (os.path.basename(self.directory), " (%dx)" % count if count > 1 else ""))
+                if os.path.basename(os.path.dirname(self.directory)) != "tests":
+                    path_name = os.path.join(os.path.basename(os.path.dirname(self.directory)), self.name)
+                else:
+                    path_name = (os.path.basename(self.directory))
+                print("===> %s: OK%s" % (path_name, " (%dx)" % count if count > 1 else ""))
         elif not check_value["failure"]:
             if not self.quiet:
                 print("===> {}: OK (checks: {}, skipped: {})".format(os.path.basename(self.directory), sum(check_value.values()), check_value["skipped"]))