test(ulp): add custom linker host tests

Add build-only host tests for LP-core custom linker layouts supplied through the
LINKER option. Cover the positive paths (a full-replacement layout, a
multi-region layout with a fixed-address section, a run-from-HP-mem layout, and
memory protection) and the link-time and configure-time checks (reset-vector
placement, sizing, shared-memory overrun, the MEMPROT RX/RW boundary, a missing
reset vector, and a missing LINKER script).
This commit is contained in:
Sudeep Mohanty
2026-06-24 10:10:07 +02:00
parent 7c3b82562a
commit 06963baf0b
37 changed files with 1107 additions and 0 deletions

View File

@@ -59,6 +59,12 @@
patterns:
- host_test_ldgen
"test:host_test_ulp_linker":
labels:
- host_test
patterns:
- host_test_ulp_linker
"test:host_test_cli_installer":
labels:
- host_test

View File

@@ -107,6 +107,22 @@ test_ldgen_on_host:
variables:
LC_ALL: C.UTF-8
test_lp_core_custom_linker_on_host:
extends:
- .host_test_template
- .rules:test:host_test_ulp_linker
script:
- cd components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker
- pytest_for_ut .
test_lp_core_custom_linker_buildv2_on_host:
extends:
- .host_test_template
- .rules:test:host_test_ulp_linker
script:
- cd components/ulp/test_apps/lp_core/host_tests/lp_core_custom_linker_v2
- pytest_for_ut .
test_spiffs_on_host:
extends: .host_test_template
script:

View File

@@ -48,6 +48,19 @@
- "tools/ldgen/**/*"
.patterns-host_test_ulp_linker: &patterns-host_test_ulp_linker
- ".gitlab/ci/host-test.yml"
- "components/ulp/ld/**/*"
- "components/ulp/cmake/**/*"
- "components/ulp/CMakeLists*.txt"
- "components/ulp/component_ulp_common.cmake"
- "components/ulp/project_include.cmake"
- "components/ulp/lp_core/**/*"
- "components/ulp/test_apps/lp_core/host_tests/**/*"
# Shared linker-script preprocessing used by the buildv2 ULP path.
- "tools/cmakev2/utilities.cmake"
.patterns-build_system_win: &patterns-build_system_win
- "tools/test_build_system/**/*"
@@ -395,6 +408,17 @@
- <<: *if-dev-push
changes: *patterns-host_test_tools
.rules:test:host_test_ulp_linker:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected-check
- <<: *if-label-build-only
when: never
- <<: *if-label-host_test
- <<: *if-dev-push
changes: *patterns-host_test_ulp_linker
.rules:test:submodule:
rules:
- <<: *if-revert-branch