diff --git a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl index 0acccc7..b576942 100644 --- a/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl +++ b/src/Script_ABC_Blanton/1_Blanton_Script_A.ttl @@ -607,6 +607,29 @@ ; eleven segments between check points drifted by less than ; 1.5 s each. The DUT was never getting slower; the test ; 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_.log and a 'Reboot Cycle : +; N' banner; = 2 gives Blanton_Power_Cycle_.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 ; 0 = normal test (A/B/C), 1 = reboot cycle, 2 = power ; cycle. Default 0 so that opening the shared config cannot diff --git a/src/Script_ABC_Blanton/5_Blanton_Script_Boot_Cycle.ttl b/src/Script_ABC_Blanton/5_Blanton_Script_Boot_Cycle.ttl index 65a606d..9dfd85d 100644 --- a/src/Script_ABC_Blanton/5_Blanton_Script_Boot_Cycle.ttl +++ b/src/Script_ABC_Blanton/5_Blanton_Script_Boot_Cycle.ttl @@ -8,8 +8,14 @@ gettime str_starttime "%Y%m%d-%H%M%S" getdir mdir if EN_log = 1 then - sprintf2 filename '%s\Logs\%s_%s_%s.log' mdir project_name "Reboot_Cycle" str_starttime - logopen filename 0 1 1 1 + if EN_Cold_Warm_boot = 1 then + 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 cnt_cycle = 0 @@ -26,9 +32,16 @@ while 1 wait prompt_sonic_root sendln "sleep 10" - wait prompt_sonic_root - sprintf2 strTitle "echo -e '\033[1;32mReboot Cycle : %d \033[0m'" cnt_cycle - sendln strTitle + if EN_Cold_Warm_boot = 1 then + wait prompt_sonic_root + 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 ========== ; Make log directory