Skip to content

Commit

Permalink
twister: allow get_elf_file() to be called on native platforms
Browse files Browse the repository at this point in the history
On native platforms we typically have CONFIG_BUILD_OUTPUT_EXE set so
we end up with both zephyr.elf and zephyr.exe.  This would cause a
call to get_elf_file() to fail.  There isn't any reason to error out
since zephyr.elf and zephyr.exe should be identical.  So allow it
if the platform type is native.

Signed-off-by: Kumar Gala <[email protected]>
  • Loading branch information
galak authored and carlescufi committed Apr 8, 2023
1 parent f31aab5 commit 53bae96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pylib/twister/twisterlib/testinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def get_elf_file(self) -> str:
fns = [x for x in fns if '_pre' not in os.path.split(x)[-1]]
# EFI elf files
fns = [x for x in fns if 'zefi' not in os.path.split(x)[-1]]
if len(fns) != 1:
if len(fns) != 1 and self.platform.type != 'native':
raise BuildError("Missing/multiple output ELF binary")
return fns[0]

Expand Down

0 comments on commit 53bae96

Please sign in to comment.