mirror of
https://github.com/Michaelangel007/c2t.git
synced 2024-12-27 10:30:46 +00:00
improved test scripts
This commit is contained in:
parent
0e05f6a197
commit
c35403276b
23
test.scrp
23
test.scrp
@ -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
|
||||
|
||||
repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
|
||||
delay 0.5
|
||||
end repeat
|
||||
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
|
||||
|
26
test.sh
26
test.sh
@ -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
|
||||
if dsk_test $i
|
||||
then
|
||||
echo "$i passed"
|
||||
else
|
||||
echo "$i failed"
|
||||
exit 1
|
||||
fi
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user