From dc1f235e59897a1caa89ba2c804a27ea53dd94f4 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Mon, 10 Sep 2018 10:13:18 +0200 Subject: [PATCH] Replace expect + type in build scripts with respond. --- build/build.tcl | 11 +++-------- build/ka10/include.tcl | 8 ++++---- build/ks10/include.tcl | 8 ++++---- build/mark.tcl | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/build/build.tcl b/build/build.tcl index 31b308de..a4ddf771 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -38,14 +38,10 @@ proc respond { w 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" + respond "\n" "styo+2/popj p,\r" + respond "\n" "\033g" } proc pdset {} { @@ -71,8 +67,7 @@ proc pdset {} { proc shutdown {} { global emulator_escape respond "*" ":lock\r" - expect "_" - send "5kill" + respond "_" "5kill" respond "GO DOWN?\r\n" "y" respond "BRIEF MESSAGE" "\003" respond "_" "q" diff --git a/build/ka10/include.tcl b/build/ka10/include.tcl index 3d2a4910..08a911eb 100644 --- a/build/ka10/include.tcl +++ b/build/ka10/include.tcl @@ -98,8 +98,8 @@ proc dump_nits {} { # Since we bootstrap with a 2-pack ITS, we need to copy the MFD to # the fresh packs. - expect "\n"; type "t\033salv\r" - expect "\n"; type "ucop\033g" + respond "\n" "t\033salv\r" + respond "\n" "ucop\033g" respond "UNIT #" "0" respond "UNIT #" "2" respond "OK?" "Y" @@ -111,9 +111,9 @@ proc dump_nits {} { # Now dump the new ITS. respond "DSKDMP" "t\033its bin\r" - expect "\n"; type "\033u" + respond "\n" "\033u" respond "DSKDMP" "m\033@ salv\r" - expect "\n"; type "d\033nits\r" + respond "\n" "d\033nits\r" } proc magdmp_switches {} { diff --git a/build/ks10/include.tcl b/build/ks10/include.tcl index 2bf2ca63..3ccc25b4 100644 --- a/build/ks10/include.tcl +++ b/build/ks10/include.tcl @@ -2,11 +2,11 @@ proc start_dskdmp_its {} { start_dskdmp respond "DSKDMP" "l\033ddt\r" - expect "\n"; type "t\033its rp06\r" - expect "\n"; type "\033u" + respond "\n" "t\033its rp06\r" + respond "\n" "\033u" respond "DSKDMP" "m\033salv rp06\r" - expect "\n"; type "d\033its\r" - expect "\n"; type "its\r" + respond "\n" "d\033its\r" + respond "\n" "its\r" patch_its_and_go } diff --git a/build/mark.tcl b/build/mark.tcl index b568e96a..94cf8ac1 100644 --- a/build/mark.tcl +++ b/build/mark.tcl @@ -62,4 +62,4 @@ frontend_bootstrap shutdown start_dskdmp dump_nits -expect "\n"; type "g\033" +respond "\n" "g\033"