feat(boot): Name the log and the banner after the kind of boot
EN_Cold_Warm_boot = 1 opens Logs\Blanton_Reboot_Cycle_<ts>.log and prints a "Reboot Cycle : N" banner each round; = 2 opens Blanton_Power_Cycle_<ts>.log and prints "Power Cycle : N". Three sites branch on the flag now: the log name, the banner, and the boot itself. Two things follow from it. With EN_Cold_Warm_boot = 0 there is no longer a logopen either, so the run that already hangs at wait "Booting in blind mode" now also leaves no log to show where it stopped. EN_log = 1 on its own no longer produces a log from this macro. And anything that parses these logs has to accept both banners. The cycle banner is the record separator the check-point and per-segment timing reports are built on, so a parser that only greps "Reboot Cycle :" finds zero cycles in a power-cycle log and reports nothing without complaining. The logopen timestamp flag stays a literal 1 rather than EN_timestamp the way Script A does it. That is the right call here - the per-segment timing analysis is derived from those timestamps and there is no other way to recover them - but it does mean this macro ignores EN_timestamp = 0. Recorded under V1.2.2 in Script A's history; the header version is unchanged because V1.2.2 has not been tagged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014RetWKFZFG1ZHcitQAyhwM
This commit is contained in:
@@ -607,6 +607,29 @@
|
|||||||
; eleven segments between check points drifted by less than
|
; eleven segments between check points drifted by less than
|
||||||
; 1.5 s each. The DUT was never getting slower; the test
|
; 1.5 s each. The DUT was never getting slower; the test
|
||||||
; was reading its own history aloud once per cycle
|
; was reading its own history aloud once per cycle
|
||||||
|
; 5_.._Boot_Cycle.ttl Name the log file and the banner after the kind of boot
|
||||||
|
; EN_Cold_Warm_boot = 1 gives
|
||||||
|
; Logs\Blanton_Reboot_Cycle_<ts>.log and a 'Reboot Cycle :
|
||||||
|
; N' banner; = 2 gives Blanton_Power_Cycle_<ts>.log and
|
||||||
|
; 'Power Cycle : N'. Three sites now branch on the flag:
|
||||||
|
; the log name, the banner and the boot itself
|
||||||
|
; !! with 0 there is no longer a logopen either, so the run
|
||||||
|
; that already hangs at wait "Booting in blind mode" now
|
||||||
|
; also leaves no log to show where it stopped. EN_log =
|
||||||
|
; 1 no longer guarantees a log in this macro -
|
||||||
|
; EN_Cold_Warm_boot has to be 1 or 2 as well
|
||||||
|
; !! anything that parses these logs has to accept BOTH
|
||||||
|
; banners. The cycle banner is the record separator the
|
||||||
|
; check-point and per-segment timing reports are built
|
||||||
|
; on, so a parser that only greps 'Reboot Cycle :' finds
|
||||||
|
; zero cycles in a power-cycle log and silently reports
|
||||||
|
; nothing at all
|
||||||
|
; The logopen timestamp flag is still a literal 1 here
|
||||||
|
; rather than EN_timestamp the way ScriptA does it. Leaving
|
||||||
|
; it on is the right call - the per-segment timing analysis
|
||||||
|
; is derived from those timestamps and there is nothing
|
||||||
|
; else to recover them from - but it does mean this macro
|
||||||
|
; ignores EN_timestamp = 0
|
||||||
; config.ttl Add EN_Cold_Warm_boot
|
; config.ttl Add EN_Cold_Warm_boot
|
||||||
; 0 = normal test (A/B/C), 1 = reboot cycle, 2 = power
|
; 0 = normal test (A/B/C), 1 = reboot cycle, 2 = power
|
||||||
; cycle. Default 0 so that opening the shared config cannot
|
; cycle. Default 0 so that opening the shared config cannot
|
||||||
|
|||||||
@@ -8,8 +8,14 @@ gettime str_starttime "%Y%m%d-%H%M%S"
|
|||||||
getdir mdir
|
getdir mdir
|
||||||
|
|
||||||
if EN_log = 1 then
|
if EN_log = 1 then
|
||||||
sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Reboot_Cycle" str_starttime
|
if EN_Cold_Warm_boot = 1 then
|
||||||
logopen filename 0 1 1 1
|
sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Reboot_Cycle" str_starttime
|
||||||
|
logopen filename 0 1 1 1
|
||||||
|
elseif EN_Cold_Warm_boot = 2 then
|
||||||
|
sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Power_Cycle" str_starttime
|
||||||
|
logopen filename 0 1 1 1
|
||||||
|
else
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cnt_cycle = 0
|
cnt_cycle = 0
|
||||||
@@ -26,9 +32,16 @@ while 1
|
|||||||
wait prompt_sonic_root
|
wait prompt_sonic_root
|
||||||
sendln "sleep 10"
|
sendln "sleep 10"
|
||||||
|
|
||||||
wait prompt_sonic_root
|
if EN_Cold_Warm_boot = 1 then
|
||||||
sprintf2 strTitle "echo -e '\033[1;32mReboot Cycle : %d \033[0m'" cnt_cycle
|
wait prompt_sonic_root
|
||||||
sendln strTitle
|
sprintf2 strTitle "echo -e '\033[1;32mReboot Cycle : %d \033[0m'" cnt_cycle
|
||||||
|
sendln strTitle
|
||||||
|
elseif EN_Cold_Warm_boot = 2 then
|
||||||
|
wait prompt_sonic_root
|
||||||
|
sprintf2 strTitle "echo -e '\033[1;32mPower Cycle : %d \033[0m'" cnt_cycle
|
||||||
|
sendln strTitle
|
||||||
|
else
|
||||||
|
endif
|
||||||
|
|
||||||
; ========== Pre Setting ==========
|
; ========== Pre Setting ==========
|
||||||
; Make log directory
|
; Make log directory
|
||||||
|
|||||||
Reference in New Issue
Block a user