Skip to content

Commit 5b2b91c

Browse files
authored
Arm backend: Fix mypy warning in runner_utils.py (#15634)
Add a return None if elf_path is not set. Signed-off-by: per.held@arm.com
1 parent 9843222 commit 5b2b91c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backends/arm/test/runner_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,9 @@ def assert_elf_path_exists(elf_path):
714714
)
715715

716716

717-
def get_elf_path(target_board: str, use_portable_ops: bool = False):
717+
def get_elf_path(target_board: str, use_portable_ops: bool = False) -> str:
718+
elf_path = ""
719+
718720
if target_board not in VALID_TARGET:
719721
raise ValueError(f"Unsupported target: {target_board}")
720722

@@ -729,14 +731,13 @@ def get_elf_path(target_board: str, use_portable_ops: bool = False):
729731
f"arm_semihosting_executor_runner_{portable_ops_str}{target_board}",
730732
"arm_executor_runner",
731733
)
732-
assert_elf_path_exists(elf_path)
733734
elif target_board == "vkml_emulation_layer":
734735
elf_path = os.path.join(
735736
f"arm_test/arm_executor_runner_{portable_ops_str}vkml",
736737
"executor_runner",
737738
)
738-
assert_elf_path_exists(elf_path)
739739

740+
assert_elf_path_exists(elf_path)
740741
return elf_path
741742

742743

0 commit comments

Comments
 (0)