Make the testing-mode require explicit, reject a missing declared srcDir, and validate installs before marking success

This commit is contained in:
J. Nick Koston
2026-08-20 08:08:29 -05:00
parent 0defff2c81
commit 4eeceded0d
7 changed files with 63 additions and 17 deletions
@@ -49,7 +49,7 @@ def test_relocate_ratetable_requires_anchor() -> None:
def test_testing_memory_patches_enlarge_segments() -> None:
patched = apply_testing_memory_patches(_FLASH_LD_SNIPPET)
patched = apply_testing_memory_patches(_FLASH_LD_SNIPPET, require=())
assert (
"iram1_0_seg : org = 0x40100000, len = 0x200000"
in patched
@@ -83,4 +83,5 @@ def test_testing_memory_patches_require() -> None:
"MEMORY { }", require=("dram0_0_seg", "irom0_0_seg")
)
# Segments a file does not require are patched opportunistically only
assert apply_testing_memory_patches("MEMORY { }") == "MEMORY { }"
# With nothing required, unmatched content passes through unchanged
assert apply_testing_memory_patches("MEMORY { }", require=()) == "MEMORY { }"