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
23
test.scrp
23
test.scrp
@ -12,7 +12,6 @@ on run argv
|
|||||||
set theMachine to (make new AppleIIe)
|
set theMachine to (make new AppleIIe)
|
||||||
tell theMachine
|
tell theMachine
|
||||||
set speaker volume to 0.25
|
set speaker volume to 0.25
|
||||||
#insert my_path & "test.dsk" into device "S6D1"
|
|
||||||
insert my_path & my_test into device "S6D1"
|
insert my_path & my_test into device "S6D1"
|
||||||
-- Now wait for the startup screen
|
-- Now wait for the startup screen
|
||||||
delay 0.5
|
delay 0.5
|
||||||
@ -27,19 +26,15 @@ on run argv
|
|||||||
-- Set the speed to maximum, to go quickly through the startup phase.
|
-- Set the speed to maximum, to go quickly through the startup phase.
|
||||||
set speed to maximum
|
set speed to maximum
|
||||||
|
|
||||||
-- with timeout of 180 seconds
|
try
|
||||||
-- waiting until the last word of the last line of the compact screen text = "REBOOT"
|
with timeout of 5 seconds
|
||||||
-- end timeout
|
repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
|
||||||
|
delay 0.5
|
||||||
-- with timeout of 180 seconds
|
end repeat
|
||||||
-- waiting until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
|
end timeout
|
||||||
-- end timeout
|
on error
|
||||||
|
do shell script "echo timeout"
|
||||||
-- use timeout code
|
end try
|
||||||
|
|
||||||
repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
|
|
||||||
delay 0.5
|
|
||||||
end repeat
|
|
||||||
|
|
||||||
-- short test of image, not necessary, next 3 lines can be removed
|
-- short test of image, not necessary, next 3 lines can be removed
|
||||||
-- delay 0.5
|
-- 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
|
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}
|
osascript test.scrp test.${FILETYPE}
|
||||||
|
|
||||||
@ -25,15 +25,25 @@ dsk_test()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PATH=~/wine/bin:$PATH
|
||||||
|
|
||||||
|
CMD=("./c2t-96h" "wine windows/c2t-96h")
|
||||||
|
|
||||||
for i in zork.dsk dangerous_dave.po
|
for i in zork.dsk dangerous_dave.po
|
||||||
do
|
do
|
||||||
if dsk_test $i
|
for j in $(seq 0 $(( ${#CMD[@]} - 1 )) )
|
||||||
then
|
do
|
||||||
echo "$i passed"
|
echo ${CMD[$j]} $i test.aif
|
||||||
else
|
eval ${CMD[$j]} $i test.aif
|
||||||
echo "$i failed"
|
if dsk_test $i
|
||||||
exit 1
|
then
|
||||||
fi
|
echo "$i passed"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
echo "$i failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user