This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nuttx-ntfc-testing.git
The following commit(s) were added to refs/heads/main by this push:
new f86f06d ltp: discover test cases from application binaries on kernel
builds
f86f06d is described below
commit f86f06d42238e14098cdd8fda3bf79b008c20608
Author: raiden00pl <[email protected]>
AuthorDate: Fri Aug 7 10:11:00 2026 +0200
ltp: discover test cases from application binaries on kernel builds
Kernel builds install every application as a standalone binary, so the
ltp_*_main symbols the discovery looked for do not exist in the OS
image and no test case was generated. Enumerate the ltp_* binaries
from app_bindir, keeping the symbol scan for flat builds.
Signed-off-by: raiden00pl <[email protected]>
Assisted-by: Claude Code
---
ltp/conftest.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/ltp/conftest.py b/ltp/conftest.py
index 743e856..84fb414 100644
--- a/ltp/conftest.py
+++ b/ltp/conftest.py
@@ -118,6 +118,18 @@ def _extract_ltp_functions(elf_path: str) -> List[str]:
return [symbol.name[: -len("_main")] for symbol in ltp_symbols]
+def _extract_ltp_applications(bindir: str) -> List[str]:
+ """Extract LTP test applications (ltp_*) from a binary directory.
+
+ Kernel builds install every application as a standalone binary, so
+ the test cases are file names instead of symbols in the OS image.
+ """
+ if not bindir or not os.path.isdir(bindir):
+ return []
+
+ return sorted(name for name in os.listdir(bindir) if
name.startswith("ltp_"))
+
+
def load_task_config() -> Dict[str, Any]:
"""Load task configuration from default_config.yaml"""
try:
@@ -167,8 +179,11 @@ def pytest_generate_tests(metafunc):
)
return
- # Extract LTP test cases directly from ELF
- ltp_cases = _extract_ltp_functions(elf_path)
+ # Extract LTP test cases from the application binaries on kernel
+ # builds, from the OS image symbols otherwise
+ ltp_cases = _extract_ltp_applications(main_core_conf.get("app_bindir", ""))
+ if not ltp_cases:
+ ltp_cases = _extract_ltp_functions(elf_path)
if not ltp_cases:
logging.warning("No LTP test cases found in ELF file")