From 3026256e0c1b26d342268cecaec7a9695df1c54c Mon Sep 17 00:00:00 2001 From: Jie Kang Date: Thu, 28 Nov 2024 14:37:50 -0500 Subject: [PATCH] Simplify validation of exclusion format --- scripts/disabled_tests/exclude_parser.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/scripts/disabled_tests/exclude_parser.py b/scripts/disabled_tests/exclude_parser.py index 39364ecabf..32e05973b1 100644 --- a/scripts/disabled_tests/exclude_parser.py +++ b/scripts/disabled_tests/exclude_parser.py @@ -122,7 +122,7 @@ class TestExclusionSplitLine(TestExclusionRawLine): @classmethod def from_raw_line(cls, test_excl: TestExclusionRawLine): - split_line = test_excl.raw_line.split(maxsplit=2) + split_line = test_excl.raw_line.split() if len(split_line) != 3: raise TestExclusionProcessingException( f'Not exactly 3 elements when splitting {test_excl.raw_line}', test_excl) @@ -195,17 +195,8 @@ def transform_platform(os_arch_platform: str) -> str: return f"{arch_name}_{os_name}" -def validate_platforms(split: TestExclusionSplitLine): - # the platform exclusion list must be comma-delimited with no spaces - platforms = split.raw_platform - if ' ' in platforms.strip(): - raise TestExclusionProcessingException( - f'{split.origin_file.path}:{split.line_number} : ' - f'Space found in platform exclusion text. Please remove', platforms) - def resolve_platforms(split: TestExclusionSplitLine) -> List[str]: revolved_platforms = [] - validate_platforms(split) list_of_unresolved_platform_names = [s.strip() for s in split.raw_platform.split(",") if s.strip()] for plat in list_of_unresolved_platform_names: if plat == "generic-all":