From 4ed283d0cab62269096975cf384b8d8d3569e126 Mon Sep 17 00:00:00 2001 From: ETWen Date: Fri, 21 Aug 2026 09:17:50 +0800 Subject: [PATCH] feat(ttl): Wait for thermal sensors before taking baseline data New utils/wait_init.ttl polls `show platform temperature` every 10 s until it stops reporting "Thermal Not detected", so Script A does not record a baseline while pmon is still coming up. Script A calls it right after `show boot` and bumps to V1.0.3. The include pointed at utils/wait_thermal.ttl while the file is wait_init.ttl -- as Script A's own V1.0.3 history line says. Corrected; Tera Term aborts the macro when an include cannot be opened, so this would have stopped Script A at line 59 on the first run. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM --- src/Script_ABC_Blanton/1_Blanton_Script_A.ttl | 11 +++++-- src/Script_ABC_Blanton/utils/wait_init.ttl | 30 +++++++++++++++++++ 2 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/Script_ABC_Blanton/utils/wait_init.ttl diff --git a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl index 2cb07bf..16ac2d1 100644 --- a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl +++ b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl @@ -1,7 +1,7 @@ ; ============================================================================= ; Script A for Blanton -; Version : V1.0.2 -; Date : 2026-08-17 +; Version : V1.0.3 +; Date : 2026-08-21 ; Author : ETWen ; ============================================================================= ; Version History: @@ -14,7 +14,8 @@ ; ScriptB Remove stress_hhmd, stress_pcie ; Blanton_Script Add blanton_traffic_linespeed.sh ; ScriptB/C Add Traffic Test -; +; V1.0.3 2026-08-21 utils/wait_init.ttl Created +; ScriptA Add Wait DUT Ready ; ============================================================================= include "config.ttl" @@ -53,6 +54,10 @@ sendln cmd wait prompt_sonic_root sendln "show boot" +; ========== Wait DUT Init ========== +wait prompt_sonic_root +include "utils/wait_init.ttl" + ; ========== BMC version ========== wait prompt_sonic_root sendln "bmc-manager run 'cat /etc/issue'" diff --git a/src/Script_ABC_Blanton/utils/wait_init.ttl b/src/Script_ABC_Blanton/utils/wait_init.ttl new file mode 100644 index 0000000..207e2da --- /dev/null +++ b/src/Script_ABC_Blanton/utils/wait_init.ttl @@ -0,0 +1,30 @@ +; ============================================================================= +; File : utils/wait_init.ttl +; Version : V1.0.0 +; Date : 2026-08-21 +; Author : ETWen +; ============================================================================= +; Wait until "show platform temperature" is not "Thermal Not detected". +; Enter : prompt of the previous command is NOT consumed. +; Exit : "show platform temperature" is sent, prompt NOT consumed. +; +; Version History: +; V1.0.0 2026-08-21 Initial Version +; ============================================================================= +wt_interval = 10 +timeout = 30 +wait prompt_sonic_root + +:WAIT_THERMAL +sendln "show platform temperature" +wait "Thermal Not detected" prompt_sonic_root +if result = 2 then + goto THERMAL_OK +endif +wait prompt_sonic_root +pause wt_interval +goto WAIT_THERMAL + +:THERMAL_OK +timeout = 0 +sendln "show platform temperature"