mirror of
https://github.com/Michaelangel007/c2t.git
synced 2024-11-26 06:49:16 +00:00
improved test scripts
This commit is contained in:
parent
0e05f6a197
commit
c35403276b
17
test.scrp
17
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
|
||||
|
||||
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
12
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
|
||||
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