test(cmakev2): Assert ELF output in Linux target build test

Made-with: Cursor
This commit is contained in:
Sudeep Mohanty
2026-03-04 18:26:16 +01:00
parent f00d5db927
commit d6b1fd56a4
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
import logging
import sys
from pathlib import Path
import pytest
from test_build_system_helpers import IdfPyFunc
@@ -12,3 +13,6 @@ from test_build_system_helpers import IdfPyFunc
def test_linux_target_build(idf_py: IdfPyFunc) -> None:
logging.info('Can build for Linux target')
idf_py('--preview', '-DIDF_TARGET=linux', 'build')
elf = Path('build/build_test_app.elf')
assert elf.exists(), 'ELF file was not produced by the Linux build'
assert elf.stat().st_size > 0, 'ELF file is empty — link step may have failed silently'