]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
run: Allow tests in subdirectories
authorShivani Bhardwaj <shivanib134@gmail.com>
Thu, 11 Jul 2019 12:32:32 +0000 (18:02 +0530)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 29 Aug 2019 04:40:50 +0000 (10:10 +0530)
With this patch it is now possible to have subdirectories with tests
under the main test directory. This shall help tests become more
organized.

run.py

diff --git a/run.py b/run.py
index f9907bf542385e33a60671785ac204ed4b29e483..01ee8bc300875d212f619617899c33064ffdb8de 100755 (executable)
--- a/run.py
+++ b/run.py
@@ -803,8 +803,11 @@ def main():
         if dirpath == tdir:
             continue
 
-        # We only want to go one level deep.
-        dirnames[0:] = []
+        # Check if there are sub-test directories
+        if "test.yaml" in filenames or "check.sh" in filenames:
+            dirnames[0:] = []
+        else:
+            continue
 
         if not args.patterns:
             tests.append(dirpath)