]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
runner: treat missing pcap as condition to 'skip'
authorVictor Julien <victor@inliniac.net>
Tue, 16 Jan 2018 11:07:53 +0000 (12:07 +0100)
committerJason Ish <ish@unx.ca>
Tue, 16 Jan 2018 12:56:38 +0000 (06:56 -0600)
This allows disabling of tests by renaming the pcap file to <pcap>.disabled
or similar.

run.py

diff --git a/run.py b/run.py
index 7dc796f2c075203be82fe36d2daa68090920729e..4fed5a408e203d5cf04f2d7d16e28a72af5dbf22 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -393,7 +393,7 @@ class TestRunner:
         # Find pcaps.
         pcaps = glob.glob(os.path.join(self.directory, "*.pcap"))
         if not pcaps:
-            raise TestError("No pcap file found")
+            raise UnsatisfiedRequirementError("No pcap file found")
         elif len(pcaps) > 1:
             raise TestError("More than 1 pcap file found")
         args += ["-r", pcaps[0]]