improved test scripts

This commit is contained in:
Egan Ford 2016-01-06 16:05:37 -07:00
parent 0e05f6a197
commit c35403276b
2 changed files with 27 additions and 22 deletions

View File

@ -12,7 +12,6 @@ on run argv
set theMachine to (make new AppleIIe)
tell theMachine
set speaker volume to 0.25
#insert my_path & "test.dsk" into device "S6D1"
insert my_path & my_test into device "S6D1"
-- Now wait for the startup screen
delay 0.5
@ -27,19 +26,15 @@ on run argv
-- Set the speed to maximum, to go quickly through the startup phase.
set speed to maximum
-- with timeout of 180 seconds
-- waiting until the last word of the last line of the compact screen text = "REBOOT"
-- end timeout
-- with timeout of 180 seconds
-- waiting until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
-- end timeout
-- use timeout code
try
with timeout of 5 seconds
repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
delay 0.5
end repeat
end timeout
on error
do shell script "echo timeout"
end try
-- short test of image, not necessary, next 3 lines can be removed
-- delay 0.5

12
test.sh
View File

@ -8,7 +8,7 @@ dsk_test()
dd if=/dev/zero of=test.$FILETYPE bs=1k count=140 >/dev/null 2>&1
./c2t-96h ${BASENAME} test.aif
#./c2t-96h ${BASENAME} test.aif
osascript test.scrp test.${FILETYPE}
@ -25,15 +25,25 @@ dsk_test()
return 1
}
PATH=~/wine/bin:$PATH
CMD=("./c2t-96h" "wine windows/c2t-96h")
for i in zork.dsk dangerous_dave.po
do
for j in $(seq 0 $(( ${#CMD[@]} - 1 )) )
do
echo ${CMD[$j]} $i test.aif
eval ${CMD[$j]} $i test.aif
if dsk_test $i
then
echo "$i passed"
echo
else
echo "$i failed"
exit 1
fi
done
done
exit 0