diff --git a/.script/tests/asimParsersTest/ASimFilteringTest.py b/.script/tests/asimParsersTest/ASimFilteringTest.py index df6bfbb4b6e..3845ee95596 100644 --- a/.script/tests/asimParsersTest/ASimFilteringTest.py +++ b/.script/tests/asimParsersTest/ASimFilteringTest.py @@ -288,7 +288,7 @@ def main(): else: SchemaName = None # Check if changed file is a union parser. If Yes, skip the file - if PARSER_FILE_NAME.endswith((f'ASim{SchemaName}.yaml', f'im{SchemaName}.yaml')): + if PARSER_FILE_NAME.endswith((f'ASim{SchemaName}.yaml', f'im{SchemaName}.yaml', f'vim{SchemaName}Empty.yaml')): continue parser_file_path = PARSER_FILE_NAME sys.stdout.flush() # Explicitly flush stdout diff --git a/.script/tests/asimParsersTest/VerifyASimParserTemplate.py b/.script/tests/asimParsersTest/VerifyASimParserTemplate.py index aa1fde1a5f8..7c9abb360b5 100644 --- a/.script/tests/asimParsersTest/VerifyASimParserTemplate.py +++ b/.script/tests/asimParsersTest/VerifyASimParserTemplate.py @@ -53,8 +53,8 @@ def run(): for parser in parser_yaml_files: schema_name = extract_schema_name(parser) - if not schema_name or parser.endswith(f'ASim{schema_name}.yaml') or parser.endswith(f'im{schema_name}.yaml'): - print(f"{YELLOW}Skipping '{parser}' as this is a union parser file. Union parser files are not tested.{RESET}") + if parser.endswith((f'ASim{schema_name}.yaml', f'im{schema_name}.yaml', f'vim{schema_name}Empty.yaml')): + print(f"{YELLOW}Skipping '{parser}' as this is a union or empty parser file. This file won't be tested.{RESET}") continue # Skip vim parser file if the corresponding ASim parser file is not present elif parser.split('/')[-1].startswith('vim'): diff --git a/.script/tests/asimParsersTest/ingestASimSampleData.py b/.script/tests/asimParsersTest/ingestASimSampleData.py index e041deedf06..8de99b8aa1d 100644 --- a/.script/tests/asimParsersTest/ingestASimSampleData.py +++ b/.script/tests/asimParsersTest/ingestASimSampleData.py @@ -321,9 +321,9 @@ def convert_data_type(schema_result, data_result): SchemaName = SchemaNameMatch.group(1) else: SchemaName = None - # Check if changed file is a union parser. If Yes, skip the file - if file.endswith((f'ASim{SchemaName}.yaml', f'im{SchemaName}.yaml')): - print(f"Ignoring this {file} because it is a union parser file") + # Check if changed file is a union or empty parser. If Yes, skip the file + if file.endswith((f'ASim{SchemaName}.yaml', f'im{SchemaName}.yaml', f'vim{SchemaName}Empty.yaml')): + print(f"Ignoring this {file} because it is a union or empty parser file") continue print(f"Starting ingestion for sample data present in {file}") asim_parser_url = f'{SENTINEL_REPO_RAW_URL}/{commit_number}/{file}' diff --git a/.script/tests/asimParsersTest/runAsimTesters.ps1 b/.script/tests/asimParsersTest/runAsimTesters.ps1 index 28708187bd1..d4aaf7f18bc 100644 --- a/.script/tests/asimParsersTest/runAsimTesters.ps1 +++ b/.script/tests/asimParsersTest/runAsimTesters.ps1 @@ -92,9 +92,9 @@ function testSchema([string] $ParserFile) { } } $Schema = (Split-Path -Path $ParserFile -Parent | Split-Path -Parent) - if ($parsersAsObject.Parsers) { + if ($parsersAsObject.Parsers -or ($parsersAsObject.ParserName -like "*Empty")){ Write-Host "***************************************************" - Write-Host "${yellow}The parser '$functionName' is a union parser, ignoring it from 'Schema' and 'Data' testing.${reset}" + Write-Host "${yellow}The parser '$functionName' is a union or empty parser, ignoring it from 'Schema' and 'Data' testing.${reset}" Write-Host "***************************************************" } else { testParser ([Parser]::new($functionName, $parsersAsObject.ParserQuery, $Schema.Replace("Parsers/ASim", ""), $parsersAsObject.ParserParams))