From de346f7a45e31d9b7c3a0aa06ec2f28e1690fd1a Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Thu, 2 Aug 2018 21:04:45 +0100 Subject: [PATCH] Add, and look for, an explicit marker after (todo)/(todoi). Trying to match the list output from these functions, without also matching the "; Loading" messages from Lisp, is difficult to do reliably in expect (as demonstrated by a series of test builds on a slowish VM). Instead, use a marker ("=Build=") that won't appear in the output. --- build/build.tcl | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/build/build.tcl b/build/build.tcl index e226d328..07605c58 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -87,21 +87,9 @@ proc build_macsyma_portion {} { respond_load "(load \"maxdoc;mcldat\")" respond_load "(load \"libmax;module\")" respond_load "(load \"libmax;maxmac\")" - respond_load "(todo)" - expect { - -re {\) *\r} { - } - "NIL" { - } - } - type "(todoi)" - expect { - -re {\) *\r} { - } - "NIL" { - } - } - type "(mapcan #'(lambda (x) (doit x)) (append todo todoi))" + respond_load "(progn (print (todo)) (print (todoi)) \"=Build=\")" + expect "=Build=" + respond "\r" "(mapcan #'(lambda (x) (doit x)) (append todo todoi))" set timeout 1000 expect { ";BKPT" {