feat: refresh managed audio after OTA activation
This commit is contained in:
@@ -29,6 +29,8 @@ BASELINE_HEADER = ROOT / "ql-application/threadx/interface/custom_app/inc/ota_ba
|
||||
BUILD_MACRO = ROOT / "ql-application/threadx/interface/custom_app/lib/hal/build_macro.h"
|
||||
APP_MAKEFILE = ROOT / "ql-application/threadx/interface/custom_app/Makefile"
|
||||
MQTT_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/mqtt.c"
|
||||
NET_MGT_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/net_mgt.c"
|
||||
HTTP_DOWNFILE_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/http_downfile.c"
|
||||
FULLOTA2_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/ota_fullfota2.c"
|
||||
URL_POLICY_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/ota_url_policy.c"
|
||||
LEGACY_HTTP_SOURCE = ROOT / "ql-application/threadx/interface/custom_app/http_aofei.c"
|
||||
@@ -204,6 +206,17 @@ def verify_fota_contract() -> None:
|
||||
fail("MQTT OTA command still invokes the legacy FULLOTA1 path")
|
||||
if "banban_ota_url_is_allowed" not in mqtt:
|
||||
fail("MQTT OTA command does not enforce the shared URL policy")
|
||||
if "OTA_STATE_FLAG_AUDIO_REFRESH_PREPARED" not in mqtt or \
|
||||
"ota_prepare_post_update_audio_refresh" not in mqtt:
|
||||
fail("post-update audio refresh is not tied to the verified OTA target version")
|
||||
net_mgt = NET_MGT_SOURCE.read_text(encoding="utf-8", errors="replace")
|
||||
refresh_position = net_mgt.find("ota_prepare_post_update_audio_refresh()")
|
||||
download_position = net_mgt.find("app_file_check_download()")
|
||||
if refresh_position < 0 or download_position < 0 or refresh_position > download_position:
|
||||
fail("post-update audio deletion must run immediately before missing-file download")
|
||||
audio_source = HTTP_DOWNFILE_SOURCE.read_text(encoding="utf-8", errors="replace")
|
||||
if re.search(r"index\s*==\s*19", audio_source):
|
||||
fail("barge_in_cute.mp3 is still excluded from managed audio refresh")
|
||||
url_policy = URL_POLICY_SOURCE.read_text(encoding="utf-8", errors="replace")
|
||||
if 'BANBAN_OTA_BASE_DOMAIN "talkingq.com"' not in url_policy:
|
||||
fail("OTA URL policy no longer allows the talkingq.com domain family")
|
||||
|
||||
Reference in New Issue
Block a user