Skip to content

Commit

Permalink
forgot to add test.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
datajerk committed Apr 2, 2017
1 parent 5672a39 commit 90211ae
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 90211ae

Please sign in to comment.