aboutsummaryrefslogtreecommitdiffstats
path: root/selftest/all_tests.py
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-06 18:35:26 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-05-06 18:49:31 +0200
commitab1904a307b531dbd1c738ef04eeeeb68f9920b3 (patch)
tree665d524265171d0e977633f4c29536b9174d8364 /selftest/all_tests.py
parent636f560dc2f26d303a0bdb7115744cb402159131 (diff)
selftest: Move tests into own subdirectories
Diffstat (limited to 'selftest/all_tests.py')
-rwxr-xr-xselftest/all_tests.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/selftest/all_tests.py b/selftest/all_tests.py
index 5c1ce59..bb00793 100755
--- a/selftest/all_tests.py
+++ b/selftest/all_tests.py
@@ -72,14 +72,20 @@ def verify_output(got, expect_file, update=False):
script_dir = sys.path[0]
tests = []
-for f in os.listdir(script_dir):
- file_path = os.path.join(script_dir, f)
- if not os.path.isfile(file_path):
+for d in os.listdir(script_dir):
+ dir_path = os.path.join(script_dir, d)
+ if not os.path.isdir(dir_path):
continue
-
- if not (file_path.endswith('_test.py') or file_path.endswith('_test.sh')):
+ if not dir_path.endswith('_test'):
continue
- tests.append(file_path)
+ for f in os.listdir(dir_path):
+ file_path = os.path.join(script_dir, d, f)
+ if not os.path.isfile(file_path):
+ continue
+
+ if not (file_path.endswith('_test.py') or file_path.endswith('_test.sh')):
+ continue
+ tests.append(file_path)
ran = []
errors = []