diff --git a/test/fixtures/morse_main_loop.cpp b/test/fixtures/morse_main_loop.cpp index 4832423c4..c1d30c594 100644 --- a/test/fixtures/morse_main_loop.cpp +++ b/test/fixtures/morse_main_loop.cpp @@ -20,6 +20,12 @@ uint32_t millis() { return 100000; } void delay(unsigned) { ++delays; } bool usbLoggingRecoverySafe() { return true; } namespace mesh { +namespace power { +// Regulator persistence/recovery has separate executable tests. Keep its +// lifecycle boundary visible while this fixture exercises actual role loops. +static unsigned regulator_services=0; +void serviceRegulatorSettings() { ++regulator_services; } +} void serviceUsbLoggingPort() { ++usb_services; } void serviceUsbTerminalPort() { ++usb_services; } bool isUsbLoggingEnabled() { return false; } @@ -259,4 +265,7 @@ int main() { the_mesh.dual_radio=false; loop(); assert(board.profile_preparations==profile_preparations+1 && board.sleeps==profile_sleeps+1); +#if !ROLE_REPEATER + assert(mesh::power::regulator_services==board.calls); +#endif } diff --git a/test/fixtures/official_web_console/firmware.cpp b/test/fixtures/official_web_console/firmware.cpp index 651eafd7b..e3ee7f701 100644 --- a/test/fixtures/official_web_console/firmware.cpp +++ b/test/fixtures/official_web_console/firmware.cpp @@ -24,6 +24,10 @@ struct Stream { } } console; namespace mesh { +namespace power { +// The command-pump fixture isolates USB/CLI timing from regulator storage. +void serviceRegulatorSettings() {} +} void serviceUsbLoggingPort() {} void serviceUsbTerminalPort() {} bool takeUsbTerminalSessionReset() { return false; } diff --git a/test/test_official_config_gui.py b/test/test_official_config_gui.py index 4e36c0133..e1996b899 100644 --- a/test/test_official_config_gui.py +++ b/test/test_official_config_gui.py @@ -96,6 +96,10 @@ MockSerial Serial; pump = body((ROOT / "examples/simple_repeater/main.cpp").read_text(), "static void __attribute__((noinline)) serviceCommandInterfaces()") return source + r''' +namespace mesh { namespace power { +// The command-pump fixture isolates USB/CLI timing from regulator storage. +void serviceRegulatorSettings() {} +}} struct MyMesh { void handleUsbCommand(const char*, char* reply) { strcpy(reply, "Unknown"); } void cancelPendingSerialOutput() {}