c2d/test.sh

152 lines
3.3 KiB
Bash
Raw Normal View History

2017-04-02 17:09:48 +00:00
#!/bin/bash
set -e
PATH=bin:$PATH
2017-04-02 17:09:48 +00:00
BIN=gameserverclient
ADDR=800
SUM=898ebb103fdda6fffe62394c1b915d1d
rm -f ${BIN}.dsk
echo
echo "Testing OS/X c2d..."
2017-04-09 03:03:52 +00:00
echo
echo "c2d ${BIN},${ADDR} ${BIN}.dsk"
c2d ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
2017-04-02 17:09:48 +00:00
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
2017-04-09 03:56:22 +00:00
echo "FAILED $CHECK != $SUM (expect)"
2017-04-02 17:09:48 +00:00
exit 1
fi
2017-04-02 17:10:46 +00:00
rm -f ${BIN}.dsk
2017-04-02 17:09:48 +00:00
echo
echo "Testing Windows c2d..."
2017-04-09 03:03:52 +00:00
echo
2017-04-02 17:09:48 +00:00
PATH=$HOME/wine/bin:$PATH
2017-04-09 03:03:52 +00:00
echo "wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
2017-04-02 17:09:48 +00:00
wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
2017-04-09 03:56:22 +00:00
echo "FAILED $CHECK != $SUM (expect)"
2017-04-02 17:09:48 +00:00
exit 1
fi
2017-04-16 01:41:29 +00:00
SUM=d70651dcc97e854aad3b4164948fec4a
2017-04-09 02:58:11 +00:00
rm -f ${BIN}.dsk
echo
echo "Testing OS/X c2d textpage..."
2017-04-09 03:03:52 +00:00
echo
echo "text2page <${BIN}.text | page2text | text2page >${BIN}.textpage"
text2page <${BIN}.text | page2text | text2page >${BIN}.textpage
echo "c2d -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
c2d -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
2017-04-09 02:58:11 +00:00
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
2017-04-09 03:56:22 +00:00
echo "FAILED $CHECK != $SUM (expect)"
2017-04-09 02:58:11 +00:00
exit 1
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
2017-04-09 03:03:52 +00:00
echo
2017-04-09 02:58:11 +00:00
PATH=$HOME/wine/bin:$PATH
2017-04-09 03:03:52 +00:00
echo "wine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
2017-04-09 02:58:11 +00:00
wine bin/text2page.exe <${BIN}.text >${BIN}.textpage
2017-04-09 03:03:52 +00:00
echo "wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
2017-04-09 02:58:11 +00:00
wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
2017-04-09 03:56:22 +00:00
echo "FAILED $CHECK != $SUM (expect)"
2017-04-09 02:58:11 +00:00
exit 1
fi
2017-04-09 03:56:22 +00:00
2017-04-15 19:48:21 +00:00
BIN=gameserverclient
MON=gameserverclient.mon
ADDR=800
SUM=898ebb103fdda6fffe62394c1b915d1d
rm -f ${BIN}.dsk
echo
echo "Testing OS/X c2d..."
echo
echo "c2d ${MON} ${BIN}.dsk"
c2d ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
2017-04-15 19:48:21 +00:00
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/c2d.exe ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
fi
2017-04-16 01:41:29 +00:00
SUM=d70651dcc97e854aad3b4164948fec4a
2017-04-15 19:48:21 +00:00
rm -f ${BIN}.dsk
echo
echo "Testing OS/X c2d textpage..."
echo
echo "text2page <${BIN}.text >${BIN}.textpage"
text2page <${BIN}.text >${BIN}.textpage
echo "c2d -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
c2d -t ${BIN}.textpage ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
2017-04-15 19:48:21 +00:00
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
fi
rm -f ${BIN}.dsk
echo
echo "Testing Windows c2d textpage..."
echo
PATH=$HOME/wine/bin:$PATH
echo "wine bin/text2page.exe <${BIN}.text >${BIN}.textpage"
wine bin/text2page.exe <${BIN}.text >${BIN}.textpage
echo "wine bin/c2d.exe -t ${BIN}.textpage ${BIN},${ADDR} ${BIN}.dsk"
wine bin/c2d.exe -t ${BIN}.textpage ${MON} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo "FAILED $CHECK != $SUM (expect)"
exit 1
fi
2017-04-09 03:56:22 +00:00
echo