From 94139c79be29cc8e4119899af2a71d1a467e63cd Mon Sep 17 00:00:00 2001 From: mikecarper Date: Sun, 25 Oct 2026 14:10:02 -0700 Subject: [PATCH] Use production radio apply results in WiFi safety tests --- test/fixtures/wifi_ap_shared_lr_sdk.h | 4 +++- test/test_wifi_ap_lr_safety.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/fixtures/wifi_ap_shared_lr_sdk.h b/test/fixtures/wifi_ap_shared_lr_sdk.h index 593545d69..a1470dbfe 100644 --- a/test/fixtures/wifi_ap_shared_lr_sdk.h +++ b/test/fixtures/wifi_ap_shared_lr_sdk.h @@ -33,7 +33,9 @@ struct esp_now_send_info_t {}; struct esp_now_recv_info_t {const uint8_t* src_addr;}; struct esp_now_peer_info_t {uint8_t peer_addr[6];int channel,ifidx;bool encrypt;}; struct esp_now_rate_config_t {int phymode,rate;bool ersu,dcm;}; -namespace mesh {enum class RadioParamApplyResult {APPLIED};} +namespace mesh { +@RADIO_APPLY_ENUM@ +} int failure=0,mode_reads=0,station_writes=0,ap_writes=0,storage_writes=0; int init_calls=0,deinit_calls=0,wake_refs=0,send_calls=0,power=0,rate_calls=0; bool driver_initialized=true,sdk_active=false,storage_ram=false,lr=false,nvs_lr=false; diff --git a/test/test_wifi_ap_lr_safety.py b/test/test_wifi_ap_lr_safety.py index 561a6ee84..9b6b31486 100644 --- a/test/test_wifi_ap_lr_safety.py +++ b/test/test_wifi_ap_lr_safety.py @@ -215,6 +215,9 @@ def build_and_run(scenario, *, mutation=None, full=True): for name in ('esp_err.h', 'esp_wifi.h', 'WiFi.h', 'Preferences.h'): (folder / name).write_text('#pragma once\n') fixture = (ROOT / 'test/fixtures/wifi_ap_shared_lr_sdk.h').read_text() + dispatcher = (ROOT / 'src/Dispatcher.h').read_text() + fixture = fixture.replace('@RADIO_APPLY_ENUM@', + method(dispatcher, 'enum class RadioParamApplyResult') + ';') source = fixture + '\n#include \n#include \n' source += 'constexpr int ESP_ERR_INVALID_ARG=-4;\n#include \n' source += '#include \n'