added first simple test

This commit is contained in:
Piotr Krysik 2009-06-14 19:43:53 +02:00
parent 48dc955afd
commit 87aca185e3
1 changed files with 16 additions and 0 deletions

16
src/python/test.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
./gsm_receive.py -I cfile > receiver-test.out
echo " 01 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b\n 15 06 21 00 01 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b" > receiver-comp.out
diff receiver-test.out receiver-comp.out > receiver-test-diff.out
test_result=`cat receiver-test-diff.out`
rm receiver-test.out receiver-test-diff.out receiver-comp.out
if [ "x$test_result" = "x" ]; then
echo "Test: passed"
exit 0
else
echo "Test: failed"
exit 1
fi