diff options
author | Anatoly Parshintsev <114445139+aap-sc@users.noreply.github.com> | 2024-05-04 06:41:41 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 06:41:41 +0300 |
commit | 89a45c0365718716d307609a4ea57762995bb9c6 (patch) | |
tree | eca4259e14be1e2b928c13f9efd983c6c7d19f7e | |
parent | 1dde0ef3bee0d3f86c6f41796f28625924dc6ba0 (diff) | |
parent | 203362f8719d0eb24ea64b7cf4a7a2ae4ab8796b (diff) | |
download | riscv-tests-89a45c0365718716d307609a4ea57762995bb9c6.zip riscv-tests-89a45c0365718716d307609a4ea57762995bb9c6.tar.gz riscv-tests-89a45c0365718716d307609a4ea57762995bb9c6.tar.bz2 |
Merge pull request #554 from MarekVCodasip/exclusion-fix
debug: Fix loading of empty exclude lists with comments
-rw-r--r-- | debug/testlib.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/debug/testlib.py b/debug/testlib.py index 1d3fd18..d4826bb 100644 --- a/debug/testlib.py +++ b/debug/testlib.py @@ -1076,12 +1076,16 @@ class PrivateState: def load_excluded_tests(excluded_tests_file, target_name): result = [] - if excluded_tests_file is None or len(excluded_tests_file) == 0: + if excluded_tests_file is None: + # No list of excluded tests was specified return result target_excludes = {} with open(excluded_tests_file, encoding="utf-8") as file: raw_data = yaml.safe_load(file) + if raw_data is None: + # File contains no targets + return result for (target, test_list) in raw_data.items(): if not isinstance(test_list, list): raise ValueError( |