From 7a23f23902e792cc76f4b2d9eed9cad42a4cca06 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Sat, 4 Aug 2018 18:31:19 +0100 Subject: [PATCH] Silence the system job by patching ITS on boot. Since we're interacting with ITS through the system console, one cause of build failures is the messages the system job prints to the console at unpredictable times -- for example, periodic timestamps and notifications of changes to files in system directories. If one of these gets printed while we're expecting something else, it's hard for the Expect script to recover. Avoid this by patching STYO, the system job's character-printing routine, to return without doing anything if this system is up. Adjust the pdset routine so it's matching PDSET's output rather than the system job's to tell when the time has been set. --- build/basics.tcl | 2 +- build/build.tcl | 21 +++++++++++++++------ build/ka10/include.tcl | 2 +- build/ks10/include.tcl | 4 ++-- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/build/basics.tcl b/build/basics.tcl index ea102157..d2c86f33 100644 --- a/build/basics.tcl +++ b/build/basics.tcl @@ -1,6 +1,6 @@ log_progress "ENTERING BUILD SCRIPT: BASICS" -expect "\n"; type "\033g" +patch_its_and_go pdset respond "*" ":login db\r" diff --git a/build/build.tcl b/build/build.tcl index 0a75e6a8..31b308de 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -37,8 +37,19 @@ proc respond { w r } { type $r } +proc patch_its_and_go {} { + expect "\n" + + # Disable SYSJOB output (e.g. "IT IS NOW ...") that appears at random + # places during the build process. + type "styo+2/popj p,\r" + expect "\n" + + type "\033g" +} + proc pdset {} { - expect "SYSTEM JOB USING THIS CONSOLE" + expect "IN OPERATION" sleep 1 type "\032" @@ -50,12 +61,10 @@ proc pdset {} { type "!." expect "DAYLIGHT SAVINGS" { type "N" - respond "IT IS NOW" "Q" - } "IT IS NOW" { - type "Q" - } "ITS revived" { - type "Q" + expect "\n" + } "\n" { } + type "Q" expect ":KILL" } diff --git a/build/ka10/include.tcl b/build/ka10/include.tcl index 4364bd1b..419223de 100644 --- a/build/ka10/include.tcl +++ b/build/ka10/include.tcl @@ -2,7 +2,7 @@ proc start_dskdmp_its {} { start_dskdmp build/sims/boot respond "DSKDMP" "its\r" - expect "\n"; type "\033g" + patch_its_and_go } proc mark_packs {} { diff --git a/build/ks10/include.tcl b/build/ks10/include.tcl index 387e2860..2bf2ca63 100644 --- a/build/ks10/include.tcl +++ b/build/ks10/include.tcl @@ -7,7 +7,7 @@ proc start_dskdmp_its {} { respond "DSKDMP" "m\033salv rp06\r" expect "\n"; type "d\033its\r" expect "\n"; type "its\r" - expect "\n"; type "\033g" + patch_its_and_go } proc mark_packs {} { @@ -56,7 +56,7 @@ proc prepare_frontend {} { start_its respond "DSKDMP" "its\r" - type "\033g" + patch_its_and_go pdset respond "*" ":login db\r"