diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-05-06 18:35:26 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2020-05-06 18:49:31 +0200 |
commit | ab1904a307b531dbd1c738ef04eeeeb68f9920b3 (patch) | |
tree | 665d524265171d0e977633f4c29536b9174d8364 /selftest/all_tests.py | |
parent | 636f560dc2f26d303a0bdb7115744cb402159131 (diff) |
selftest: Move tests into own subdirectories
Change-Id: Id21cda19df131e24402e1a593036e1e33a914920
Diffstat (limited to 'selftest/all_tests.py')
-rwxr-xr-x | selftest/all_tests.py | 18 |
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 = [] |