1
0
mirror of https://github.com/simh/simh.git synced 2026-02-15 20:27:40 +00:00

simulator tests: Fix test setup to tolerate very busy or slow host systems

Adjust the RUNLIMIT to specify instructions instead of wall clock time.
This commit is contained in:
Mark Pizzolato
2022-11-12 15:34:24 -10:00
parent bfc5232f66
commit f48f0de9a5
5 changed files with 48 additions and 48 deletions

View File

@@ -7,7 +7,7 @@
cd %~p0
:: Limit maximum diagnostic execution time
runlimit 2 minutes
runlimit 1500M instructions
set on
on error ignore
on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; exit 1
@@ -28,9 +28,9 @@ load diags/maindec-8e-d0ab-pb.bin
dep 5276 7402
dep sr 07777
go -q 200
if (PC != 0147 || AC != 0) echof "MAINDEC-8/E-D0AB failed."; exit 1
if (PC != 0147 || AC != 0) echof "MAINDEC-8/E-D0AB failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
go -q
if (PC != 05277) echof "MAINDEC-8/E-D0AB failed."; exit 1
if (PC != 05277) echof "MAINDEC-8/E-D0AB failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
echof "passed"
:: Autoindexing, Indirect addressing, and the DCA instruction with
@@ -44,7 +44,7 @@ load diags/maindec-8e-d0bb-pb.bin
dep 3740 7402
dep sr 0
go -q 200
if (PC != 03741) echof "MAINDEC-8/E-D0BB failed."; exit 1
if (PC != 03741) echof "MAINDEC-8/E-D0BB failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
echof "passed"
:: The ADDER test
@@ -56,9 +56,9 @@ dep 4561 7402
:: And ask the tests to be quiet, test extended (banked) memory.
dep sr 0200
go -q 200
if (PC != 04622) echof "MAINDEC-8/E-D0CC failed."; exit 1
if (PC != 04622) echof "MAINDEC-8/E-D0CC failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
echof
echof "** PDP-8: Adder test passed."
echof "** PDP-8: Adder test passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."
:: Random AND tests
echof -n "** PDP-8: Random AND test: "
@@ -66,8 +66,8 @@ load diags/maindec-8e-d0db-pb.bin
:: Halt after one 4096 loop pass, suppress output
dep sr 02400
go -q 200
if (PC != 00355) echof "MAINDEC-8/E-D0DB failed."; exit 1
echof "passed."
if (PC != 00355) echof "MAINDEC-8/E-D0DB failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
echof "passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."
:: Random TAD tests
echof -n "** PDP-8: Random TAD test: "
@@ -78,8 +78,8 @@ dep 6743 7402
:: Suppress output
dep sr 00400
go -q 200
if (PC != 06744) echof "MAINDEC-8/E-D0EB failed."; exit 1
echof "passed."
if (PC != 06744) echof "MAINDEC-8/E-D0EB failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% ."; exit 1
echof "passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."
:: Random ISZ tests
:: Bit more of a challenge: cant just put a HLT instruction to
@@ -88,8 +88,8 @@ if (SIM_REGEX_TYPE == "") echof "Missing Regular Expression support - skipping R
echof "** PDP-8: Random ISZ test: "
load diags/maindec-8e-d0fc-pb.bin
dep sr 0
expect -r [25] "\r\nFC" echof; echof "** PDP-8: Random ISZ test: passed."
expect -r "F [0-7]{4}" echof; echof "** PDP-8: Random ISZ test: MAINDEC-8/E-D0FC failed."; exit 1
expect -r [25] "\r\nFC" echof; echof "** PDP-8: Random ISZ test: passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."
expect -r "F [0-7]{4}" echof; echof "** PDP-8: Random ISZ test: MAINDEC-8/E-D0FC failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
go -q 200
:ISZ_DONE
@@ -100,10 +100,10 @@ load diags/maindec-8e-d0gc-pb.bin
dep 0404 7402
dep sr 0
go -q 200
if (PC != 0405) echof "MAINDEC-8/E-D0GC failed."; exit 1
echof "passed."
if (PC != 0405) echof "MAINDEC-8/E-D0GC failed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."; exit 1
echof "passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS%."
echof
echof "!! All Tests Passed !!"
echof "!! All Tests Passed after running for %SIM_RUNTIME% %SIM_RUNTIME_UNITS% !!"
echof
exit 0