forgot to add test.sh script

This commit is contained in:
Egan Ford 2017-04-02 11:09:48 -06:00
parent 5672a39a1c
commit 90211ae28f
3 changed files with 37 additions and 1 deletions

View File

@ -14,7 +14,7 @@ bin/c2d.exe: c2d.c c2d.h
$(WIN32GCC) -Wall -Wno-missing-braces -I. -O3 -o bin/c2d.exe c2d.c
clean:
rm -f bin/*
rm -f bin/* *.dsk
test: gameserverclient bin/c2d bin/c2d.exe
./test.sh

View File

@ -24,6 +24,7 @@
| bin/c2d | OS/X x86 Binary |
| bin/c2d.exe | Windows Binary |
| gameserverclient | Test Apple II Binary |
| test.sh | test script |
### Download

35
test.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
set -e
BIN=gameserverclient
ADDR=800
SUM=898ebb103fdda6fffe62394c1b915d1d
rm -f ${BIN}.dsk
echo
echo "Testing OS/X c2d..."
bin/c2d ${BIN},${ADDR} ${BIN}.dsk 2>&1 | sed 's/^/ /'
CHECK=$(md5sum ${BIN}.dsk | awk '{print $1}')
if [ "$CHECK" = "$SUM" ]
then
echo PASSED
else
echo FAILED
exit 1
fi
echo
echo "Testing Windows c2d..."
PATH=$HOME/wine/bin:$PATH
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
echo FAILED
exit 1
fi