]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
runner: convert relative pcap filenames to full path
authorJason Ish <jason.ish@oisf.net>
Fri, 29 Apr 2022 16:14:43 +0000 (10:14 -0600)
committerJason Ish <jason.ish@oisf.net>
Fri, 29 Apr 2022 16:14:43 +0000 (10:14 -0600)
Allows copying and pasting the `cmdline` file when relative pcap file
names are used.

run.py

diff --git a/run.py b/run.py
index 1c1763d171af62051633288273b9976f7084066e..b1a46be5dca7302cfa8e340dcab6d9a527dbd372 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -798,7 +798,7 @@ class TestRunner:
 
         # Find pcaps.
         if "pcap" in self.config:
-            args += ["-r", self.config["pcap"]]
+            args += ["-r", os.path.realpath(os.path.join(self.directory, self.config["pcap"]))]
         else:
             pcaps = glob.glob(os.path.join(self.directory, "*.pcap"))
             pcaps += glob.glob(os.path.join(self.directory, "*.pcapng"))