[Simh] Unit/functional testing simulators

Mark Pizzolato - Info Comm Mark at infocomm.com
Wed Dec 3 20:05:50 EST 2014


On Tuesday, December 02, 2014 at 8:38 PM, Phil Budne wrote:
> Mark Pizzolato wrote:
> > ... Running these needs some sort of scripting paradigm to load, start and
> examine the results of such tests.
> 
> Over a decade ago I wrote a Tcl "expect" script to install ITS on a SIMH
> simulated KS-10 from "install tapes".  It isn't pretty (I had to look for input
> echo in order not to lose input characters in some places), but it works, or
> worked, I haven't run it in a while!
> 
> ftp://ftp.ultimate.com/pdp10/its-install
> 
> Python, Ruby and Perl now have expect-like modules, so there's a wider
> range of choices for scripting language-- the key thing is that simh has to be
> run under a pseudo-terminal (pty)-- pipes will not do!
> 
> I'm a big believer in regression tests (ever since I joined the DEC
> FORTRAN-10/20 project, which used SNOBOL4 to parse test results).
> My SNOBOL4 in C project(*) has a regression test suite, and every bug I fix,
> and most features I add get a test.

EXPECT and SEND were added as built-in commands in simh to avoid the need and complexity of setting up external components (Python, Ruby and Perl).  

It shouldn't be too hard to convert existing TCL scripts to simh scripts and end up with scripts that work on any host platform that simh builds on.

Thanks for pointing at these Tcl "expect" scripts for the its install.  They were a great example of a more than trivial test case for the simh EXPECT and SEND commands.  I'll be glad to supply these upon request and I'll send a copy directly to Phil.

- Mark


More information about the Simh mailing list