fix(es3c35p): align runtime configuration

This commit is contained in:
Adolfo Reyna
2026-09-07 23:15:26 -04:00
parent f95cd7df4c
commit a321bfeb4c
3 changed files with 29 additions and 4 deletions
@@ -311,11 +311,39 @@ def test_compile_missing_config():
print("PASSED")
return True
def test_es3c35p_uses_current_runtime_contract():
print("Running test_es3c35p_uses_current_runtime_contract...")
repository_root = os.path.abspath(os.path.join(SCRIPT_DIR, "..", "..", ".."))
device_dir = os.path.join(repository_root, "Devices", "es3c35p")
with open(os.path.join(device_dir, "device.properties")) as f:
properties = f.read()
with open(os.path.join(device_dir, "es3c35p.dts")) as f:
devicetree = f.read()
requirements = [
("apps.launcherAppId=tactility.launcher" in properties, "current launcher app id"),
("hardware.tinyUsb=" not in properties, "no obsolete hardware.tinyUsb property"),
('wifi0 {\n\t\tcompatible = "espressif,esp32-wifi-pinned";\n\t};' in devicetree,
"Wi-Fi enabled for web server and MCP"),
('ble0 {\n\t\tcompatible = "espressif,esp32-ble";\n\t};' in devicetree,
"BLE node matches hardware.bluetooth=true"),
]
missing = [description for condition, description in requirements if not condition]
if missing:
print("FAILED: " + ", ".join(missing))
return False
print("PASSED")
return True
if __name__ == "__main__":
tests = [
test_compile_success,
test_compile_invalid_dts,
test_compile_missing_config,
test_es3c35p_uses_current_runtime_contract,
test_minmax_within_range_succeeds,
test_minmax_below_minimum_fails,
test_minmax_above_maximum_fails,