mirror of
https://github.com/Michaelangel007/c2t.git
synced 2025-01-14 05:31:21 +00:00
play list to stderr, added automated testing on OS/X with virtual ][
This commit is contained in:
parent
6028a9d287
commit
1369765ae0
3
Makefile
3
Makefile
@ -14,3 +14,6 @@ c2t-96h: c2t-96h.c c2t.h
|
||||
|
||||
c2t.h: mon/dos33.boot1.mon mon/dos33.boot2.mon asm/autoload.s asm/diskload2.s asm/diskload3.s asm/diskload8000.s asm/diskload9600.s asm/fastload8000.s asm/fastload9600.s asm/fastloadcd.s asm/inflate.s
|
||||
./makeheader
|
||||
|
||||
test: c2t-96h
|
||||
./test.sh
|
||||
|
@ -1849,8 +1849,8 @@ void printevents(event *events, int rate)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("Play List:\n\n");
|
||||
fprintf(stderr,"Play List:\n\n");
|
||||
for(i=0;i<eventnumber;i++)
|
||||
printf("%06.02f\t%s\n",events[i].timestamp/(float)rate,events[i].label);
|
||||
printf("\n");
|
||||
fprintf(stderr,"%06.02f\t%s\n",events[i].timestamp/(float)rate,events[i].label);
|
||||
fprintf(stderr,"\n");
|
||||
}
|
||||
|
53
test.scrp
Normal file
53
test.scrp
Normal file
@ -0,0 +1,53 @@
|
||||
on run argv
|
||||
|
||||
set my_path to (system attribute "PWD") & "/"
|
||||
set my_test to item 1 of argv
|
||||
|
||||
tell application "Virtual ]["
|
||||
activate
|
||||
delay 0.5
|
||||
-- Close all open machines
|
||||
close every machine saving no
|
||||
-- Create a standard Apple //els
|
||||
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
|
||||
reset
|
||||
|
||||
repeat until the last line of the compact screen text = "]"
|
||||
delay 0.5
|
||||
end repeat
|
||||
|
||||
type line "LOAD"
|
||||
play my_path & "test.aif" on device "cassette recorder"
|
||||
-- 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
|
||||
|
||||
-- short test of image, not necessary, next 3 lines can be removed
|
||||
-- delay 0.5
|
||||
-- type line ""
|
||||
-- delay 3
|
||||
|
||||
end tell
|
||||
close every machine saving no
|
||||
quit
|
||||
end tell
|
||||
end run
|
40
test.sh
Executable file
40
test.sh
Executable file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
dsk_test()
|
||||
{
|
||||
BASENAME=$(basename $1)
|
||||
FILETYPE=$(echo $BASENAME | awk -F. '{print $NF}')
|
||||
FILENAME=$(echo $BASENAME | sed "s/.$FILETYPE$//")
|
||||
|
||||
dd if=/dev/zero of=test.$FILETYPE bs=1k count=140 >/dev/null 2>&1
|
||||
|
||||
./c2t-96h ${BASENAME} test.aif
|
||||
|
||||
osascript test.scrp test.${FILETYPE}
|
||||
|
||||
S1=$(md5sum ${BASENAME} | awk '{print $1}')
|
||||
S2=$(md5sum test.$FILETYPE | awk '{print $1}')
|
||||
|
||||
echo "$BASENAME $S1 $S2"
|
||||
|
||||
if [ "$S1" = "$S2" ]
|
||||
then
|
||||
rm -f test.$FILETYPE test.aif
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
for i in zork.dsk dangerous_dave.po
|
||||
do
|
||||
if dsk_test $i
|
||||
then
|
||||
echo "$i passed"
|
||||
else
|
||||
echo "$i failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user